Download

How to check if ACharacter is moving?

I have units that I move using UAIBlueprintHelperLibrary::SimpleMoveToLocation(MyCharacter->GetController(), MoveLocation);
Given that I couldn’t find a function that would allow me to check wheather units have reached their destination I was hoping that the very least I could check if they are moving/walking and do the logic once they stop.
After going through all the functions for ages I found MyCharacter->GetCharacterMovement()->IsMovementInProgress() but it always returns false. Movement state always returns walking, even if still.
Any suggestions?

You can check if component’s velocity is nearly zero.

You could check for velocity > 0.
if (MovementComp->Velocity.Size() > 0)
// is moving

Velocity can be stopped by many things, like running into an obsticle. I was hoping not to go down the path where I have to declare range for how close the unit is to the location, which would be different depending on what size is the object its tryign to approach.