Bug in GetActorFeetLocation (ignores Origin)
I was having problems with my vehicle driving AI and noticed that the pathfinding failed. Hunting the bug down led me to UNavMovementComponent::GetActorFeetLocation, which is currently ignoring the Origin of the Bounding box. As a result, a vehicle setup like the VehicleGame example (where the mesh is completely above Z=0) will have GetActorFeetLocation returning values that are 1/2 of the Z bounding box size below the ground. With the default MinAgentHalfHeightPct multiplier of 1.05%, that can lead to cases where UPathFollowingComponent::HasReachedInternal erroneously returns false, although the vehicle is exactly on top of the goal location. The fix is to replace UpdatedComponent->Bounds.BoxExtent.Z with (UpdatedComponent->Bounds.BoxExtent.Z + UpdatedComponent->Bounds.Origin.Z) in NavMovementComponent.h
My workaround for now is GetPathFollowingComponent()->SetPreciseReachThreshold(1.1f, 2.05f), which just increases MinAgentHalfHeightPct to make the tolerance greater than the GetActorFeetLocation error.
asked Sep 09 '17 at 10:53 PM in Bug Reports
Follow this question
Once you sign in you will be able to subscribe for any updates here