- Home /
Rigidbody SweepTest doesnt work for mesh collider?
it seems that Rigidbody.SweepTest doesnt work for mesh collider. Replacing it with a primitive collider it works. Is this an expected behavior?
UPDATE 11/10/2010 Im still waiting for a reply
I'm having the same problem with SweepTest. Just to see whats the same and whats different: Is your meshcollider set as a trigger? Do you have it in a layer?
When you said you replaced it with a primitive collider, do you mean one of the Physics.***Cast such as SphereCast or CapsuleCast?
1) no 2) no 3) no i mean that i replaced it with a sphere collider
$$anonymous$$eshcollider always make trouble, because they aren't supported in all cases due to performance. Two rigidbodys with meshcollider can't collide either. If you set one $$anonymous$$eshcollider to "convex" it works. I think that could also help in this case, but not sure and not tested. It also depends on if you can live with the convex shape of your meshcollider. If not you can use some primitive collider to form a compound collider of your shape.
$$anonymous$$y mesh collider is set to "convex" but this doesnt help. I think that Rigidbody SweepTest is not supprted for mesh colliders.
Answer by Ricardo Arango · Jul 21, 2011 at 09:52 AM
This should work. If it still doesn't work please file a bug report.
Answer by michele · Dec 22, 2011 at 12:01 PM
it seems that PhysX doesnt support mesh or convex mesh rigidbody sweep tests. http://www.esenthel.com/wiki/index.php?title=Actor
Your answer
![](https://koobas.hobune.stream/wayback/20220613081450im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rigidbody objects not colliding. 4 Answers
How to remove internal triangle/faces when combining mesh 0 Answers
Why attach a kinematic rigidbody to a collider that moves a lot? 1 Answer
Mesh collider collision detection 0 Answers
Catapult question 2 Answers