- Home /
should I remove unused rgidbodies?
Suppose there are many falling rigidbodies.
When they hit the ground they will stay there till the end.
Is is better to remove the Rigidbody to get static Colliders or is that unnecessary?
Answer by SanderN · Oct 11, 2014 at 01:38 PM
It depends on how many Rigidbodies you have and what platform you are planning to use.
If you are developing for mobile you should definitely try to remove all of the unnecessary Rigidbodies. That being said average PC these days can easily support up to hundreds if not thousands of Rigidbodies. But every Rigidbodies does use a little bit of performance even if you don't notice it.
So long story short you should always try to minimize the amount of Rigidbodies you have in the scene if it's possible.
Thanks. The problem is only that changing a static collider (removing the rigidbody) forces a re-scan. And that costs a little bit on a mobile platform.
You could adjust the "is kinematic" property upon collision with the ground. It will no longer be affected by the physics engine if you do this, just a thought.
That sounds as if I have to do some resting with the profiler. :)
"Is kinematic" does not help the collision detection. So deleting the rigidbody should be much better.
You are right alaroid. But you could disable the collider as well, depends what you want to do with them when they are on the ground. You can disable everything/anything, used when doing object pooling.
Your answer
Follow this Question
Related Questions
How to detect collision with a rigidbody? 3 Answers
Is the child collider still static even if I parent them with a rigidbody ? 2 Answers
Can't figure out my collision mistake, please help! 1 Answer
Rigid body not moving 0 Answers
Can i Move/Rotate triggers without Rigidbodies? And other collider questions. 3 Answers