Summary
npc_actions_component.Focus() does not correctly orient NPCs toward the specified location. The NPC does not appear to pitch toward the target, while the vertical angle to the target also incorrectly affects its yaw. Additionally, the yaw appears to have a constant offset of approximately 22.25°.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
AI
Steps to Reproduce
- Spawn an NPC using an NPC Spawner.
- Get the NPC’s npc_actions_component.
- Call Focus() with a world-space location using /Verse.org/SpatialMath.vector3.
- Place the focus location several meters away from the NPC.
- Move the focus location to different positions around the NPC, including different horizontal directions, heights, and distances.
- Observe the NPC’s visible facing direction and compare it with the actual direction toward the focus location.
Expected Result
The NPC should face the exact location passed to npc_actions_component.Focus(), correctly adjusting its yaw and pitch based on the target’s position.
Observed Result
The NPC’s pitch does not visually change at all when focusing on locations above or below it. Instead, the vertical angle between the NPC and the focus location appears to affect the NPC’s yaw, causing the horizontal facing direction to behave unpredictably depending on the focus location. Additionally, the NPC’s yaw appears to have a constant offset of approximately 22.25°.
Platform(s)
PC
Additional Notes
This was tested with NPCs using the Guard NPC Character Type. I have not confirmed whether the issue behaves exactly the same with Custom or other NPC types.
The issue was primarily tested using npc_actions_component.Focus(Location). Similar incorrect focus behavior also appears to occur with focus_interface.MaintainFocus(Location).
Since the vertical angle to the focus location appears to additionally affect yaw while the NPC’s visible pitch does not change, this may be related to an incorrect coordinate/rotation conversion. This could potentially be related to the coordinate system changes introduced with the newer /Verse.org/SpatialMath system, but this is only a suspicion based on the observed behavior.