I want to make a enemy that move along a wall in my 2d game. First thing i did was check if before it is a wall , if true then rotate 90 degrees up. But what if before it isn't a wall but under it like this:
![alt text][1]
[1]: /storage/temp/152845-picture1.png
And i think rotate 90 degrees isn't the best way because sometime my player don't touch the wall.
↧