- Home /
Sphere collider vs. Mesh collider
Why doesn't the mesh collider collide smoothly the same way the sphere collider does?
I filmed the difference [1st. is sphere, 2ns. is mesh and you can see my Burger shaking after it touches the coins; don't mind the dead tree collision plz]: Here
Answer by Lysander · Jan 02, 2018 at 02:30 PM
Mesh colliders are an order of magnitude more effort to calculate collisions with than primitive colliders, and obviously the collisions appear much rougher because the angles and geometry are far more complex.
Inevitably when mesh colliders are involved, the answer usually boils down to "do you actually need to use a mesh collider"? And if you do, then you should use it for only specific collisions (like being hit by bullets) and not ALL collisions (like running into walls).
Shaking after hitting the coins is odd though- are your coins not triggers for some reason? A trigger shouldn't have a physical effect on a collider in that manner, so either the shaking is not related to the coins, or you can fix it just by turning the coin colliders into triggers instead. Either way though, I wouldn't use a mesh collider for the burger- capsules are usually the best bet if you want smooth collisions with an object that's wide or tall.
Thanks you so much! I'm a beginner and these tips (+ answer) are very helpful. cheers :)
Your answer
Follow this Question
Related Questions
Mesh collider not detecting ground 1 Answer
Mesh collider wont collide smoothly 0 Answers
How do I make the platform spawn after the other one 1 Answer
infinite endless runner game Camera and Player are static or not 1 Answer
how to create a repeating environment in a 3D endless runner game 0 Answers