- Home /
Add 2d rigidbodies to moving objects to increase performance or not?
RIght, so the issue I have is, I have a game where it's possible to have over 100 moving enemies on the screen at the same time (mobile game). Currently, these enemies only have colliders on them with no rigidbodies. I do however have a rigidbody on my projectiles.
Would adding kinematic rigidbodies to the enemies incrase performance or make it worse? Moving static colliders is expensive, but so are rigidbodies :O
Answer by HarshadK · Jul 03, 2014 at 12:19 PM
AFAIK, you should use kinematic rigidbodies for your enemies since it will be less expensive in comparison to moving static colliders.
Moving rigidbodies is expensive but when you make them kinematic then it will not be driven by physics engine which is a plus rather than imposing the calculation on physics engine by moving static colliders.
In the end, I would suggest you to perform a test by yourself to understand the output of each of these methods. :-)
Thanks, I just tested it and adding kinematic rigidbodies has indeed significantly increased my framerate :)