Jump to content
tindolt

No collision??

Recommended Posts

So I have tried everything I dont know if its the object or what but the generetor(the base one that comes with leadwerks) cannot have collision set upon it. am I missing something?

Share this post


Link to post

Trust me ... even as a newbie I can tell you that it works fine ... as macklebee wrote, make sure you follow the tutorial.

 

Once you've got your collision shape defined (in the built-in model editor), make sure you save it. I am not 100% sure, but I think you will have to put the newly saved model into your map, in order for it to work.

 

Also make sure, that you have selected the proper collision type (I think it needs to be "Scene", not "Prop") ...

 

Cheers,

Greyfang

Share this post


Link to post

Hmm, just tested few things:

 

I got one model (mech A) with these params :

physics mode = character controller

collision type =prop

mass = 0.5

 

and another model (mech B):

physics mode = rigid body

collision type =prop

mass = 0.0

 

Mech A falls on Mech B and lands on it only with these props. So if I need 10 enemy units to land on a some kind of platform, I must set their physics mode to character controller ?

Share this post


Link to post

I just tried collision hull thing and it didnt worked for me, can you guys help me what I've done wrong?

As it seems everything ok.

I have a model with a limb called "collisionhull".

When I preview this my model nothing being converted.

When I press in model viewer PHYSICS > Convex hull it shows new wire frame lines but I can still see my cylinder.

(as you can see, I moved this cylinder in main editor to see if my main animated model imported correctly)

 

But when I've done the same but not in same hierarchy as it was presented in tutorial after I pressed Convex hull, my collision hull was disappeared and I saw only my model in main editor. But when I tried to run this project I saw a cylinder again.

 

Here is some screenshots:

post-17245-0-53331900-1462692098_thumb.png

 

And here is my model with texture and other stuff that was generated by LW:

!imports_20160508_132224.zip

Share this post


Link to post

Change the name of the collision to 'collisionmesh' and see if that works.

 

If there is a .phy file generated for your model (same folder) you will need to delete it as there is a bug where an existing user collision mesh wont overwrite a existing .phy file. If you modify your 'collisionmesh' you will need to delete the .phy file each time before you see it update.

 

Bug report from the issue. I Dont think I tested to see if it works:

http://www.leadwerks.com/werkspace/topic/12832-dont-think-collisionhull-is-working-anymore/page__hl__collisionhull

 

Existing bug report for phy file:

 

http://www.leadwerks.com/werkspace/topic/12881-collision-hull-reimport/page__hl__collisionhull

 

I really wish that would be fixed.

Share this post


Link to post

Change the name of the collision to 'collisionmesh' and see if that works.

 

Nope. Doesnt work. The only method that kind of works is if "collisionhull" or "collisionmesh" object will be not a limb of main model. Then when I press convex hull it will disappear and I see only my model in main editor and my own "collisionhull" wireframe. But if I "run" project I still see my cylinder :(

 

you will need to delete the .phy file each time before you see it update.

Yes I noticed that thats why when I reimport my FBX I delete phy. mdl and meta files. Just to be sure.

 

 

As for now I must conclude that this feature doesn't work as it was described in official tutorial.

Share this post


Link to post

By the naming it looks like the mesh is skinned, is that true? I don't know if that would work making a collisionmesh a child of a bone. Looks like probably not.

Share this post


Link to post

By the naming it looks like the mesh is skinned, is that true?

Collision mesh is not skinned. It may be textured in model editor for tests(like "what if"). But sadly if you import fbx + texture files (*.tga) you will get same results like I have.

Share this post


Link to post

Collision mesh is not skinned. It may be textured in model editor for tests(like "what if"). But sadly if you import fbx + texture files (*.tga) you will get same results like I have.

 

I believe this feature was not meant for animated models. If you delete the animations from FBX then convert to MDL, it will show you the collisionhull as a physics shape in the Model Editor.

Share this post


Link to post

Okay, since this is an animated model there is one top-level model. The rest of the limbs are bones. Bones have no geometry data and can't be used to build a collision shape, so that's why it isn't happening.

 

(The naming is "collisionhull" for convex hulls, which allow dynamic motion, and "collisionmesh" for static geometry.)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...