Hi,
I want to stop my sprite moving along a path when a specific distance from the end is reached (i.e. 300px from end point). Is this possible?
/Jamie
Develop games in your browser. Powerful, performant & highly capable.
Compare two values:
distance(sprite.X,Sprite.Y,Sprite.Pathfinding.NodeXAt(Sprite.Pathfinding.NodeCount-1),Sprite.Pathfinding.NodeYAt(Sprite.Pathfinding.NodeCount-1))
<
300
=> Stop
Thanks Katala, this worked great.