hi, thanks,
so i am trying as you said, but fail miserably, been trying to solve this for hoursssss lol
so anyways i did not add check to see which way to turn is faster as for now more important to get it to work.
[pascal]
newDir := ArcTan2( (DestinationY - Sprite.Y), (DestinationX - Sprite.X) );
if Sprite.Direction <> newDir then begin
//we need to turn.
Sprite.Direction := Sprite.Direction + (3 * delta);
end;
[/pascal]
by doing this, the peds just go round and round....
Bookmarks