Reply To: move to problem/bug

NodeCanvas Forums Support move to problem/bug Reply To: move to problem/bug

#11089
markusr
Participant

@Gavalakis
hi,
i think i found why it stops
this condition with remainingDistance have wrong values
its 0 before going what will stop direct, also if me will moving a 2 units distance.
my test was stoppingDistance =0,keepDistance is 0.1
so remainingDistance =2 <= stoppingDistance + keepDistance 0+0.1 can’t be true
try this row with remainingDistance>0, so the distance must calculated once after it was 0.

if (agent.pathPending)
{
//wait
} else {
Debug.Log(agent.remainingDistance);

//if (agent.remainingDistance>0f && agent.remainingDistance <= agent.stoppingDistance + keepDistance)
if (agent.remainingDistance>=0f && agent.remainingDistance <= agent.stoppingDistance + keepDistance)
{
Debug.Log(agent.pathStatus); //PathComplete
Debug.Log(agent.pathPending);
Debug.Log(agent.stoppingDistance);
Debug.Log(keepDistance);
Debug.Log(“EndAction 3”);
EndAction(true);
}

}

note: i using waitpick with a vector 3 and goto vecto3 without tweening but
my problem was with goto vector and goto object action task.