RigidBody vs Collider

Hi All,

Can you please help me with this one?

What is the difference between having a game object with collider component and rigidbody component and the rigidbody component is kinematic vs a game object with collider only?

Afterall kinematic rigidbody doesn’t obey the physics rules so what is the point of doing it? I saw some tutorials doing it for collision detection but for collision detection I can use collider without any rigidbody so why adding kinematic rigidbody?

Thank u in advance

You can indeed have a collider with no rigidbody. If there’s no rigidbody then Unity assumes the object is static, non-moving. Unity does not bother testing for collisions BETWEEN static objects. As you can imagine, this is very efficient if you have lots of scenery the player can bump into.

So the purpose of having a kinematic rigidbody, rather than no rigidbody, is to turn on collision detection between this object and all other colliders in the scene (even the static ones.) Effectively you are letting Unity know that this object moves around, so Unity will then do collision-detection between it and everything else.

(If you had a game with only two objects in it, and both move kinematically, in theory you would only need a rigidbody on one of them, even though they both move. I haven’t tried it. But now imagine three such objects- you’d have to have rigidbodies on two of them. So in practice you’ll usually just put rigidbodies on everything that both moves and collides.)

You can’t have collision detection with only colliders and no rigidbodies. The point of kinematic rigidbodies is that you can move objects around directly (without physics), and still have collisions. Also, moving static colliders is bad, because the scene graph has to be recalculated, so generally objects that are being moved should be rigidbodies.

The Kinematic setting solves certain occasional problems. In general, don’t use it, but remember it’s there. Two examples are turning on/off physics, and hinges:

You have a catapult with a child bullet in the scoop. Set kinematic to freeze it. When it is fired, unset Kin and give it a speed.

Say you want an animated object to ragdoll on death. For the ragdoll, you have to give all the bones rigidbodies. You start all bone RBs as Kinematic, to “turn off” physics, letting normal animation control everything. When it dies, you stop all animation and set all bone Kinematics back to false (“turn on” physics,) to let the ragdoll take over.

Hinges can only be linked to rigidbodies. Say you want a gate linked to a immobile post. You keep the post frozen but make it count as an RB by setting it kinematic.

This tutorial from Learn department of Unity is very useful to understand Rigidbody, Collider, and difference between them

Think about special effects like rockets. since kinematic rigidbodies aren’t affected by physics you could let them float up on Start.

a trail renderer, an explosion script and a trigger. You now have fireworks