Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Incorrect orientation of the mesh collider
KaeR
Newbie
Posts: 13
Permalink
Post Incorrect orientation of the mesh collider
on: March 13, 2013, 16:59
Quote

Hi,

I used the morph system and after adding the mesh collider, it is not aligned with the object. The gizmo also does not cover the whole object, maybe because the object is deformed only in the middle. To have it work well in our system the collider should be aligned with the model. Am I missing something?

I enclosed the picture. I hope it is visible.
Image

spookycat
Administrator
Posts: 148
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 17:20
Quote

Is the mesh a skinned and boned one?

KaeR
Newbie
Posts: 13
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 17:21
Quote

Yes.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 17:31
Quote

The problem is you cant really use a mesh collider with a skinned object, as not only do you need to update the deformed collider mesh but you will then have to do the complete skin and bone transformation on every point as well making it very slow, you need to be using things like capsule colliders on the bones for such things to approximate the shape. Plus the reason the gizmo and collider mesh are shown in the wrong position is again due to the fact they are not being altered by the bone transforms and are happening in the local space of the pose state of the object, there really isnt much that can be done about that apart from putting every calculation through the entire skinning process which probably isnt worth it just to position the gizmo box in the right place.

KaeR
Newbie
Posts: 13
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 17:51
Quote

Thank you for the explanation. The collider itself deforms accordingly to the object just in different orientation. It is not also bad regarding the speed. I am planning to use simpler mesh. But you mentioned using bones with capsule colliders which I was thinking about but then you were not thinking about using the morph system, did you?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 18:01
Quote

The speed maybe ok now but once the entire mesh has to go through the skinning pipeline again it will start to get slow, using mesh colliders on skinned objects is just something that is not expected in Unity. Using simple colliders is really the only way to go, if you use the attach system in MegaFiers you can have them so they move with the deforming mesh or as most people do just attach them to the bones.

KaeR
Newbie
Posts: 13
Permalink
Post Re: Incorrect orientation of the mesh collider
on: March 13, 2013, 18:32
Quote

You're right. I will do it that way. I may use the attach approach since there are only few bones affecting larger area with some falloff so there are no bones to attach the collider....

Is there a chance that you would answer my other question in the previous topic. I would really appreciate it. 🙂 Thank you

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.022 seconds.