Agent moves away from destination

Hi there,

I have an issue where my agent is moving away from its destination after it has reached it.

The confusing part is that 1. it is basically the same logic as another character which is working fine and 2. the agent keeps moving even after I set canMove to false and isStopped to true.

Pseudo logic looks like this:
if reachedDestination
canMove=false;
isStopped=true;

There is no change on my side on the agent’s destination or on one of these parameters AFTER it has reached its destination.

2024-05-27 16-39-06(1)

Any ideas on this?

Best regards,
Dan

set your speed to 0. Your character try to stop but speed deceleration is to slow

But these are the exact same parameters as for another agent, and he stops at destination.
also, the one in the video always moves in the same direction, so it cannot be deceleration

Hi

Are you sure there are no other components that are interfering?

I will double check again when I get back to it.

For now i can say that there is no other component moving my character besides AIPath. So i was wondering if it could move at all when

canMove=false;
isStopped=true;

anyway, I will check

If canMove is false, then the movement script will not move the component at all. The movement calculations are disabled.

Of course, I come back, look at it for like 1 minute and find the error :sweat_smile:
The walking animation added root motion …

Thank you both for the input, especially for the clarification that “canMove” can definitely not move the model.

Cya and get well soon Aron

1 Like