- Home /
Problem is not reproducible or outdated
Can't see Mesh Collider in Unity5
I'm new at Unity and I'm following the tutorial that was designated for earlier versions than 5. I applied a Mesh collider to my spaceship but after disabling the mesh render I still cant see the collider wires. It isn't minimized in the inspector if that's an issue. Am I doing something wrong here or is it just something that changed with Unity5 and I have to just deal with not seeing the mesh collider?
Ok, I shoul've played with the settings more before asking this question, but I'm gonna post the answer anyway.
Apparently in Unity5 you have to enable Convex under your $$anonymous$$esh Collider component or you can't see the collider wires, I'm not sure what difference a Convex or non-convex mesh collider have, but hey there you go :P
The docs say, "Convex: If enabled, this $$anonymous$$esh Collider will collide with other $$anonymous$$esh Colliders. Convex $$anonymous$$esh Colliders are limited to 255 triangles."
I don't know why the mesh won't render in scene view if it is not selected, but, be aware that it does change the collider behavior.
Answer by bromi · Jul 14, 2015 at 09:49 AM
There are some limitations when using the Mesh Collider. Non-convex Mesh Colliders are only supported on GameObjects without a rigidbody. If you want to use a Mesh Collider on a rigidbody, it needs to be marked as Convex.
This. The tutorial was created for unity 4, apparently it was not like this then. If you delete rigidbody, you instantly can see green lines of non-convex collider.
Notice: sometimes one should disable the mesh renderer and enable it again (i.e. refresh it) to see the green lines instantly.
Answer by gonencturkekul · Dec 29, 2015 at 11:25 AM
@bromi removing rigidbody doesn't make non-convex collider visible. My current Unity version is 5.2.3f1. I solved visibility problem by marking collider as convex, and didn't remove rigidbody.
That doesn't solve visibility problem, it modified the collider completely. It might show the collider as a result of that, but hardly a good solution.
Follow this Question
Related Questions
How do I create a mesh collider? 2 Answers
Pushing a mesh with mesh collider 1 Answer
Scaling the Mesh Collider 4 Answers
Why am I getting a null reference exception 1 Answer
How to remove internal triangle/faces when combining mesh 0 Answers