- Home /
Question by
alpayoguz97 · Jun 23, 2021 at 10:35 PM ·
grid based gamearea
how to get area of rectangular that the player went through its edges ?
Firstly,I don't know if my question title is true but I couldn't find better title, sorry If I titled wrong.
I'm trying to grid base game. The player is moving grid to grid and never stop between grids even if ıt takes command to move another direction between grids.
So, I want to get area of grids where the character walks on the edge of area.
To clarify myself
Player starts to move and tries to reach edge following brown lines. When player reaches any edge, the all tiles should be colored.
draaw.png
(49.9 kB)
Comment
instead of getting the area just use OverlapBox2d() and then all the grid squares that collide you change colour.
Your answer
