Is there a way for the player to move only inside the tiles - in the tilemap- so that the space outside the tiles is an impassable wall

is there a way for the player to move only inside the tiles - in the tilemap- so that the space outside the tiles is an impassable wall

How is the object being moved? If it’s a top down then you should be able to assign a collision to the obstacle tiles and then use…

Seperate player from tilemap only player moves…

If you use the nav mesh pathfinder then you can do the same but instead give the tilemap object the nav mesh obstacle behavior.

I think they want to avoid moving off the edge of the tilemap, where there is nothing.

It does depend on your movement system. There are a few ways to check “out of bounds”, for example by checking if the destination X and Y position are beyond the X,Y and BoundingBoxRight() / BoundingBoxBottom() of the tilemap

1 Like