- Home /
Frame rate drops with Mesh Collider
I have been using Sphere Colliders for asteroid prefabs, getting frame rates around 100 FPS. I just added a Mesh Collider (and unchecked the Sphere Collider component) and when I instantiate asteroids (one more more at a time) the frame rate drops to 1-3 FPS.
The Mesh Collider has Is Trigger checked. Convex and Smooth Sphere Collisions are unchecked.
The Mesh Renderer has Cast Shadows, Receive Shadows and use Light Probes all unchecked.
The Mesh itself has 1700 verts and 3394 tris.
Answer by Lockstep · Jan 29, 2014 at 11:25 PM
Mesh colliders are way more expensive than other colliders. Even more if it is moving. (Asteroid sounds moving to me).
Only use them if you absolutely must. Usually you can get good results if you make a low resolution mesh for the collider. Try to get the rough shape of your object with as few vertices as possible. This saves a lot of memory and the difference won't be noticeable.
Your results also depend on the platform you use. A pc just has more power than a mobile device.
Thanks for the advice/answer. A low-res mesh will work just fine for these asteroids.
Your answer
Follow this Question
Related Questions
how i can combinemultiple mesh colliderrs in to 1 big mesh 0 Answers
targetFrameRate & vSync for iOS 3 Answers
Which frame rate is correct? 1 Answer
Fixed frame rate 3 Answers
Very low frame rate with convex turn off in mesh colider 0 Answers