- Home /
How do I do detect collisions on a Tilemap when moving on a grid?
Hello.
There was a question posted on the Unity forums by Elzbach which has yet to be answered that I would like to know as well. So, I am posting it here to have to see if the question can be answered.
This is my first time here, so let me know if I am doing something wrong.
If the link does not work, here is what was said
I have a top-down game where the player moves on a grid much like Pokemon. This means when an input is received, the character moves in that direction for one tile and then needs to look again for the next input. The best way I've found to do this movement like this is here:
The issue is that this method doesn't account for collisions, nor use rigidbodies.
One older solution I read was this:
https://gamedev.stackexchange.com/q...detect-collision-of-a-wall-with-grid-movement
However, this solution is not for Unity's new Tilemap, but for a custom made array of tiles. How would I apply something like this to Unity's Tilemap? Or if there is a better solution for detecting collision on a Tilemap while moving on a grid, how do I use that?