- Home /
Player getting bumped up slightly or stuck on tilemap map,Character getting bumped into the air slightly or getting stuck on tilemap
I have a player square with rigid body 2d set to dynamic and a box collider 2d, and then I have a tilemap with tilemap collider 2d. The hitboxes seem to be right, but when I make the player move through rigidbody velocity change, it sometimes gets bumped up into the air or stuck on a flat map. I move the player in FixedUpdate.
The player (empty square) is stuck in the screenshot, even tho it seems like it shouldn't be. It seems like there could be some slight imperfections in the tilemap hitboxes, but the tiles have straight tops and so do the hitboxes (at least from what I can see). The player seems to get slowed down a little bit few times a second, but only sometimes gets stuck. To unstuck, you can just move the opposite direction a few pixels and then you can go over the place you got stuck at first without any issues.