Hi, I’ve got a problem with UNavigationSystem::SimpleMoveToLocation(GetController(), destination);
I have produced a target point FVector destination, and used SimpleMoveToLocation(GetController(), destination) to move my character to the target, then I found a problem that character moved but stopped at a point which is closed to target, I don’t know why, here is my codes:
bool AMyCharacter::RushTo(FVector destination)
{
float x = GetActorLocation().X;
float y = GetActorLocation().Y;
if (x == destination.X && y == destination.Y) return true;
else
{
UNavigationSystem::SimpleMoveToLocation(GetController(), destination);
return false;
}
return false;
}
I have printed one result out, coordinates of target point is x=1160 y=660 z=0, my character location is x=1131 y=657 z=0