- Home /
rigidbody - kinematic performance
Hello, I am creating a 2D strategy game. I'm obviously going to need to do lots of collisions. The reason I avoid using rigidbodies is because of their performance (and they tend to be a little buggier). BUT, if I use a kinematic rigidbody, how is the performance then? I did read the documentation, but it just says that "no physics calculations, I must use transforms" which I'm fine with. Is it taxing to just check for collisions? that's all I need, is to see the collider is working. Note I'm going to (hopefully) have hundreds of units.
edit: platform is PC
When one attaches a Rigidbody to a Game Object, it is because you want that object to be under the control of the physics engine. Flagging a rigidbody as $$anonymous$$inematic allows us to switch off the physics engine on that object with regards to its own movement.
In your game, are you planning on leveraging the physics engine to move any of your game objects? If not, I'm not sure you need to have a RigidBody attached at all. Detecting when one object intersects with another can be achieved through Collider components flagged as triggerable.
Oh, you're right....I thought in all this time using Unity that a rigidobdy had to be used for collisions xD..thanks! that's what I need
on a side note for anyone who actually wants to know the answer - how does iskinematic rigidobdy compare with a standard rigidbody performance wise?
@kolban - is that true about rigidbodies? I didn't know that and the documentation I read implies that you still need a rigidbody!
@whydoidoit - I'm still very very new to Unity so could be extremely wrong but what I read in the docs says "If I flag a collider as 'Triggerable' then if that collider strikes a rigidbody then the rigidbody will not be affected by the collision. Ins$$anonymous$$d, the OnTrigger callbacks will be invoked.
Your answer
Follow this Question
Related Questions
OnTriggerEnter Bad Performance - Bad Code? 1 Answer
Collision Performance Question 2 Answers
BoxCast, OverlapArea, and Raycasting; ground detection questions 0 Answers
Why is CapsuleCast/Raycast performance effected by rigidbody? 1 Answer
Collision Killing CPU/FPS/Performance - Suggestions?! 0 Answers