Collision between Kinematic Rigidbody (Player) and a tilemap collider (walls)

Hi there,

I can’t get my player to collider with my tilemap. I am trying to create a topdown 2D shooter.

The player has a kinematic rigidbody and movement is done in a FixedUpdate with rigidbody2d.MovePosition(). The movement works fine. The tilemap with the walls has a tilemap collider.

Other objects like bullets do collide with the walls because the bullets have a dynamic rigidbody.

In these scenario’s (that I don’t want) the player and the walls do collide:

  • Making the player’s rigidbody dynamic (I don’t want this because he shouldn’t be pushed away)
  • Making the tilemap’s rigidbody dynamic (Now the entire tilemap is pushable)

I can’t find a solution anywhere.

Thanks for thinking with me!

On the RigidBody 2D of the tilemap, change the Body Type to static.

That will solve the tilemap from being pushable. However, I can’t get my object to collide with a tilemap when the object is set to kinematic. It seems to only work when the object is dynamic.