2
votes

I'm using Unity 2019.4.2f1 personal

I'm getting exception :

Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path

I have a parent GameObject with some components including a Rigidbody :

Rigidbody

Then there are some children of this parent and somewhere inside there is this child name NAVI and all the polySurface34 children of NAVI have a Mesh Collider with Convex unchecked option.

polySurface34

I know that if I uncheck and disable the Mesh Collider on all the polySurface34 objects it will make the error exception to be gone but I'm not sure if this is the right solution if at all.

1
you can try if unchecking and disabling the Mesh Collider on all the polySurface34 the behaviour is the one you desire. Doesn't it depend on that if that is the right solution you are asking for? If it is not, then it should be explained why the behaviour is not the desired one and how to achieve itrustyBucketBay

1 Answers

3
votes

As the issue says, you can't use non-convex mesh colliders with non-kinematic rigidbodies anymore.

AFAIK this can be solved in at least these 2 ways:

  1. Use a convex mesh collider, which will be less accurate but actually work
  2. Use multiple primitive colliders (this is usually the best solution for player/humanoids) as it's efficient and you can place the colliders on the rig itself and they will move with your animations

Attached is a visualization of the hitboxes of one of the characters from Overwatch. As you can see, they use multiple sphere & capsule colliders to approximate the character (notice that it's also slightly larger than the actual model, this is a game design choice to make hitting a character easier/harder).

Also note that the red capsule in the middle is used to very efficiently identify critical headshots; and this is another advantage of using multiple colliders vs. a mesh collider for characters

enter image description here