0
votes

I created very simple leg model in blender and added some bones. In unity when im tryng to move bones, the mesh collider stays in the same position. screen model

How to fix that?

1

1 Answers

0
votes

Unity does not have a real native support for moving mesh colliders to align with a mesh. This is mostly due to the very high performance cost of having to recreate it to match up with the mesh every frame (it is technically possible, but runs very slow).

Simulations and games that require collision on a ragdoll or bone structure (like the leg in the picture) will just use primitives as colliders instead since because they can be adjusted to give roughly the same collision output as a mesh collider.

In your case, this could be circumvented by adding a capsule collider or box collider to each of the separate bones in the leg and then adjusting their dimensions to roughly fit the mesh. The new primitive colliders you add should then follow it properly.

Here is a link to a similar question: Unity Answers

Basically, if an object moves and needs collision, it is best to use primitives.