What are Kinematic Rigidbodies for?

I created a scene with a Collider and a Collider with a kinematic Rigidbody on the same game object. In both cases they acted the same and triggered the same collision events. What is the difference between having a kinematic rigidbody and not having that component at all?

2 Likes

Kinematic isn’t affected by forces, you could call it authoritative.

1 Like

It’s useful for making object completely controlled by the script and resolving collisions via scripts without using forces.
Kinematic rigidbodies also receive collision callbacks, so that they can be used as well.

Not to mention that you can always switch between script controlled entities, and physics controlled ones simply by changing one flag. E.g. That can be used for the ragdoll on certain events, like enemies falling dead, or throwing objects etc.

3 Likes

The reaspn you need a kinametic rigidbody instead of just having the object with a collider is for the physics system.

If you dont have a kinametic rigidbody the system needs to destroy the collider and rebuild it when ever you move it.(or so i understand it, im not an expert on unity and physix)

If you dont plan on moving it dont add a rigudbody at all and mark it as static.

EDIT: So I was lying to you, check out edy’s comment below.

This is incorrect and it’s a common misunderstanding. Since Unity 5 you can move static colliders (no rigidbodies) without incurring in a penalty. However, the official documentation is not yet updated on this, so it causes confusion.

A kinematic rigidbody is like a regular rigidbody but the pose controlled by scripting (via Rigidbody.MovePosition and Rigidbody.MoveRotation from FixedUpdate), instead of by the physics. Having a rigidbody instead of the collider alone is helpful as the interpolation options will be applied and you may still read its velocity and angular velocity.

Here’s a quick guide on the applications of the different rigidbody / kinematic / collider combinations:
https://discussions.unity.com/t/697315/2

4 Likes

to temporary shutdown for a rigidbody?

In simple terms Kinematic rigidbody means:

  1. Unity will not apply any physics to the kinematic Rigidbody.

  2. If rigidbody is kinematic, you can handle the behavior of rigidbody yourself using a script and unity will not apply any physics to that object.

  3. So for example, if you have a kinematic rigidbody floating in the air and you hit on the play button. That object will still be floating and will not fall to the ground because Unity is not applying any forces to it. However, you can use your own logic and scripts to move that rigidbody independent of the unity physics system.

  4. Also, collision callbacks are detected by kinematic rigidbodies so if you are using OnColliderEnter etc. it will work.
    You can check out this video for more information as it is explained very clearly in this video about Is Kinematic rigidbodies along with some real world game examples :

2 Likes

Thanks for taking the time to add information here but also note the age of posts; this one is several years old.

2 Likes

Hi, Sorry, I didn’t realize it is such an old post :sweat_smile:. Just wanted to ask Is there a way to make posts so that links to Youtube does not show up as a video in the posts but just a normal link which can be clicked ?

1 Like

It’s cool don’t worry! I locked this thread now.