Hello, forum this is my first post and I have a logic problem
I would like make a grid map in unity and I would like to move my character with the raycast so now there it is my problem….
[ ][ ][ ][O]
[ ][ ][ ][ ]
[X][ ][ ][ ]
if im in the X position and I click at the circle position how could I think the logic for the script to first walk on the Y position and after at the X position
What I was thinking is to make a loop to recognize my Y position and move in Y adding or substracting in my position and after that when Y is equal to the circle do the same process with the X
But now I have the next problem. What if I have an obstacle in one of the places at the grid ….
thanks if you help me with my problem and srry form my english jeje I´m a spanish guy jeje
And just one think I dont want scripts codes here I just want some logics solution to try it by myself cause I like to try write code to learn more of my errors thanks. 🙂