Hi,
I have two coroutines running in sequence, the first to rotate a NavMeshAgent NPC to face a position and the second to then make it move there.
For the rotation, I overwrite Transform#forward on the transform of the NPC GameObject and for the movement I set NavMeshAgent#SetDestination.
Both steps work, but when the pathfinding starts the initial steering direction seems to be the “old” forward direction from before the rotation instead of the current one, meaning the path is curved where I would expect a straight line (no obstacles in the vicinity) and the debug visualization of the steering direction (cyan arrow when the NavMeshAgent is selected) points almost along the initial un-rotated forward direction instead of the current one in the first frame of navigation.
Are manual changes to the transform values not respected by the NavMeshAgent, do I need to disable NavMeshAgent#updateRotation and handle all rotation myself to make this work? Or is there some other way to rotate a NavMeshAgent?