I’m running into an issue with updating my rotation with a navmesh to avoid obstacles. I used the RPG Enemy AI tutorial as my reference and have used:
Quaternion lookRotation = Quaternion.LookRotation(enemyToHero);
m_agent_local.transform.rotation = Quaternion.Slerp(m_agent_local.transform.rotation, lookRotation, Time.deltaTime * 10f);
And without an obstacle it updates the rotation correctly. However, this doesn’t take into consideration carved objects or the navmesh agent’s obstacle avoidance and I want to integrate that. Right now my character’s locomotion is driven with animation to update it’s position, but I want to use the navmesh to update it’s rotation. Any help would be greatly appreciated!