Hello, Im trying to make my sprite (8 direction animated) move to certain spot (with pathfinding). The problem is that I have no idea how to "connect" pathfinding with 8direction. Is there any tutorial out there I didnt find?
razorMonkey wrote:You could use condition "System-Compare two values" and the type in "sprite.Pathfinding.MovingAngle".
You will need 8 double conditions for every combination:
One which includes 0 angle will have to look like this:
If sprite.Pathfinding.MovingAngle > 337 or sprite.Pathfinding.MovingAngle < 23 then "look east"
Others will have to look like this:
If sprite.Pathfinding.MovingAngle > 157 and sprite.Pathfinding.MovingAngle < 203 then "look west"
If sprite.Pathfinding.MovingAngle > 203 and sprite.Pathfinding.MovingAngle < 247 then "look north/west"
and so on..
also use else between them for better performance
Users browsing this forum: No registered users and 0 guests