EncompassesPoint always fails when called with a Navigation Mesh Bounds Volume due to the Body Instance not being valid

Hi Epic!

In our game we keep track of the nav mesh bounds volumes spawned in the game.

For gameplay reasons, we are checking within which nav mesh bounds volume is the actor we are processing.

To do that, we call EncompassesPoint, but it always returns false.

Debugging a bit, I ended up in FPhysInterface_Chaos::GetSquaredDistanceToBody. It seems the logic fails to grab a valid body instance of the volume, causing the transform to be Identity

[Image Removed]

I think the body instance passed is the default one

[Image Removed]

It doesn’t have Scale (even though the volume is scaled) and there aren’t any source object pointers set

[Image Removed]

Here you can see a VisLog debug draw of the volume in Red, the point used in Yellow and the details of the Volume’s Transform (it’s scaled)

[Image Removed]

Testing with the box like this navVolume->GetBounds().GetBox().IsInside(location);

does work. For now I’m using that function

Cheers!

Steps to Reproduce

  • Create a level with a nav mesh bounds volume
  • Place an actor inside the nav mesh bounds volume (the player pawn for example)
  • In c++ get the actor location and the nav mesh bounds volume
  • call NavMeshVolume->EncompassesPoint(Actor->GetActorLocation)
  • It will return false

Hello [mention removed]​,

Apologies for the delayed response. I’m still looking into this issue and will follow up shortly to confirm whether it should be registered as an engine bug.

Best,

Francisco

Hello [mention removed]​,

I’ve reproduced this behavior in UE 5.5, 5.6, and in a recent Main build at CL 44397245.

You’re fine to continue using your current workaround, but I’ve gone ahead and registered this as an engine bug, since the result does appear incorrect as EncompassesPoint will always return false for NavMeshBoundsVolume, likely due to it not being supported by the method’s current logic.

You will be able to track the resolution by checking this link: Unreal Engine Issues and Bug Tracker (UE\-308998)

Please note that Epic ultimately determines whether the issue will be made publicly accessible and the process may take a few days. The tracking link might not work immediately.

I’ll close the case now but feel free to reply if you have anything else to add.

Best,

Francisco