MaintainFocus on Agent makes the NPC look at an offset position

Summary

I’m using an NPC Spawner with a Character Definition of the “Guard” type and some Verse behavior. When I call FocusInterface.MaintainFocus(Player), the NPC does not correctly focus on the passed Agent. Instead, it looks at an offset position, seemingly above and to the right of the Agent’s actual position.

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

AI

Steps to Reproduce

  1. Set up an NPC Spawner with a Character Definition of the “Guard” type.
  2. Add Verse behavior to the NPC.
  3. In the Verse behavior, call GetAgent[].GetFortCharacter[].GetFocusInterface[].MaintainFocus(Player) with a valid Player Agent.

Expected Result

The NPC should look directly towards the Agent’s face.

Observed Result

The NPC is looking at an offset position from the Agent.

Platform(s)

PC

Upload an image

Video

Additional Notes

I’m running this code when the Player enters a Volume Device that is following the NPC:

    StartSeePlayer(PlayerAgent : agent)<suspends> : void = {
        Print("Start see player")
        
        if (FortChar := MaybeFortChar?, Focus := FortChar.GetFocusInterface[], Navigatable := FortChar.GetNavigatable[]) {
            Navigatable.StopNavigation()

            if (PlayAnimInstance := MaybePlayAnimInstance?) {
                PlayAnimInstance.Stop()
            }
            
            loop {
                AgentExited := race {
                    Focus.MaintainFocus(PlayerAgent)
    
                    NearVolume.AgentExitsEvent.Await()
                }

                if (AgentExited = PlayerAgent) {
                    Print("Same player exited")
                    spawn{UpdateWalkTalkStatus(walk_talk_status.Idle)}
                    break
                }
            }
        }
    }