Description

The FailsafeArea of NavModifierVolume is generated at a different location from the center of the actor when it rotated. This means that the effect of rotation is incorrect. (see attached file)

 

Workaround:

void UNavModifierComponent::CalcAndCacheBounds()
{
    //...
    if (ComponentBounds.Num() == 0)
    {
        // Bounds = FBox::BuildAABB(MyOwner->GetActorLocation(), FailsafeExtent);
        FVector BoxOrigin = FTransform(MyOwner->GetActorRotation().Quaternion()).InverseTransformPosition(MyOwner->GetActorLocation());
        Bounds = FBox::BuildAABB(BoxOrigin, FailsafeExtent);
ComponentBounds.Add(FRotatedBox(Bounds, MyOwner->GetActorQuat()));
    }
    //...
}

 

Steps to Reproduce

1. Create a new Blueprint Actor.
2. Add StaticMeshComponent and assign Cube Mesh.
3. Add NavModifierVolume Component.
4. Set the StaticMeshComponent to "NoCollision".
5. Added NavMeshBoundsVolume to Level.
6. Add the created actor to Level.
7. Select actor in viewport and change "yaw".
Then, NullArea of NavModifierVolume is applied at a distance from center of the actor.

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-92064 in the post.

2
Login to Vote

Fixed
ComponentUE - AI
Affects Versions4.24
Target Fix4.26
Fix Commit12922510
Main Commit13686746
CreatedApr 16, 2020
ResolvedApr 20, 2020
UpdatedJun 16, 2020
View Jira Issue