6
\$\begingroup\$

I created a character object in Maya and stored it as char.obj, then I imported the object into Unity.

The character object is not colliding with any other Unity objects like cube, plane, sphere, etc.

Then I found non-convex mesh colliders do not collide with any other Unity default objects. How can I convert the non-convex mesh collider to a convex mesh collider?

Here is the error message I see:

Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "mesh_octopus/Default", Mesh asset path "Assets/PlaceAsset/mesh_octopus/mesh_octopus.obj" Mesh name "Default"

Inspector properties of my object

\$\endgroup\$
  • \$\begingroup\$ Can you please post screenshot of collider settings you've applied ? only the collider part from Inspector. \$\endgroup\$ – SanSolo Oct 26 '15 at 5:28
  • \$\begingroup\$ i attached the pic \$\endgroup\$ – Manoj Balaji M Oct 26 '15 at 5:46
  • \$\begingroup\$ Ok so you mean to say Mesh Collider....was confused what's a canvas collider in Unity. \$\endgroup\$ – SanSolo Oct 26 '15 at 5:48
  • \$\begingroup\$ i am using a mesh octopus. its not colliding with any objects in unity \$\endgroup\$ – Manoj Balaji M Oct 26 '15 at 5:51
  • \$\begingroup\$ and also i used rigidbody on it while running it displays an error message - Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5. If you want to use a non-convex mesh either make the Rigidbody kinematic or remove the Rigidbody component. Scene hierarchy path "mesh_octopus/Default", Mesh asset path "Assets/PlaceAsset/mesh_octopus/mesh_octopus.obj" Mesh name "Default" \$\endgroup\$ – Manoj Balaji M Oct 26 '15 at 5:58
1
\$\begingroup\$

Mesh colliders have some limitations. Specifically, it has to be set to Convex (if your Rigidbody is not kinematic) and the object should have less than 256 vertices. In addition, Mesh colliders are expensive. Better is to use Box Colliders and Sphere colliders on your object. Use multiple colliders if necessary. If you want, remove the mesh collider component and add Box and Sphere Colliders.

Also, check this video on colliders in Unity. It is official Unity tutorial and covers the basics of different colliders and when and how to use them.

\$\endgroup\$
  • \$\begingroup\$ but i want to give Left, Right, Up and Down Animations on it. if i use Box collinder instead of mesh collinder means how it works? \$\endgroup\$ – Manoj Balaji M Oct 26 '15 at 6:07
  • \$\begingroup\$ @ManojBalajiM that you will have to set using multiple colliders. Try working with some simpler objects to get a good idea about basic collision detection. \$\endgroup\$ – SanSolo Oct 26 '15 at 6:10
  • \$\begingroup\$ got it now its working in mesh Collinder i didn't check the convex that's why its not worked \$\endgroup\$ – Manoj Balaji M Oct 26 '15 at 6:16
-2
\$\begingroup\$

Just tick the convex option to check. The current body will now behave or react on other collider.

\$\endgroup\$
  • \$\begingroup\$ This does not seem to add anything that has not already been said. \$\endgroup\$ – Alexandre Vaillancourt Jun 15 '17 at 9:50
  • \$\begingroup\$ I really appreciate your views . I just want to express it in simple way so that any beginner can understand it.I'm not copying any others points. \$\endgroup\$ – ramesh Jun 15 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.