Unity Collisions - isKinematic Allows Objects to Go Through

2.2k views Asked by At

I have a user navigating and colliding with a rigid body. I would like one object to slide along the other when the collision happens. It behaves this way when the isKinematic setting is NOT checked. However, the object then moves. I would like the object to stay in place when collided with. When I turn isKinematic off, the user is able to navigate through the rigid body which shouldn't happen. Any ideas on how to fix this?

As of now, I don't have any scripts associated with the rigid body.

1

There are 1 answers

16
Ignacio Alorre On BEST ANSWER

If one object is moving and the other should be static:

  • RigidBody + Collider for the moving object
  • RigidBody (isKinematic) + Collider for the static object

So basically you are missing the Colliders to avoid GameObjects go through each other