Hello!
I’ve just started working with this program (it’s pretty great).
I’ve implemented into my game (a top down 2D RTS style game) and my characters path perfectly throughout my environment!
I have implemented a mouse option so that when I right click with a unit selected, the ‘target’ becomes an invisible object placed by the mouse, and the character moves there.
My issue is if I click directly behind my character they kinda moonwalk backwards or slide along the path.
I tried to implement the below solution, and it more or less worked
distToTarget = Vector3.Distance(GetFeetPosition(), targetPosition);
if(distToTarget>0.1f){
seeker.StartPath (GetFeetPosition (), targetPosition);
}
however it got stuck in that position as the distToTarget parameter became always less than 0.1. I could pretty simply fix this by putting this if statement elsewhere, but I was wondering if there is a bit more of an elegant solution that exists that I just haven’t found yet. My solution also kinda sucks because you can’t move small distances (what I really want is for my characters to turn on a dime before they move.)
Thanks so much for any help!