Non-Static, Non-Dynamic Collider + Rigid Body Best Practices

Hi there,

I understand it’s desirable performance-wise for colliders whose transform is controlled procedurally to be associated with a kinematic RigidBody.

What’s unclear to me, is if we gain any benefit out of doing this if the transform is manipulated completely outside of physics - i.e. without using RigidBody.position/MovePosition/MoveRotation/etc. and instead only through manipulation of GameObject.transform.

We have 3 separate cases in our project where a blackbox system is updating the transform of a game object and we want a collider on that GameObject.

In such cases, is there any benefit to having a kinematic rigid body?

Thanks,
Ant

MovePosition/MoveRotation are NOT outside of physics. In fact they uses Physics to move them. It’s integrated in physics., that’s why they are commands. What they do is create the correct velocity to reach the desired position or rotation by the next physics update.

This is so people can quickly move things without tunnelling and other issues.

The only way to teleport outside of physics is to affect the transform directly.

I think you misread, I said if you move a game object WITHOUT using those functions (so, gameobject.transform.position = Vector3.zero; or whatever)

1 Like

I see I did!

FYI, if anybody stumbles across this. I never got a definitive answer, however I found this:

Thing is, the rigid body is kept in sync with the transform so I don’t see why the colliders would have to recompute anything if the rigid body is attached to the transform you’re moving.

So in the end, I’m operating under the assumption that yes, it is better to have a kinematic Rigidbody with your colliders even if you don’t have control over how the transform is being updated.