playMaker

Author Topic: NavMesh Agent Rotation issue  (Read 3085 times)

san

  • Junior Playmaker
  • **
  • Posts: 93
NavMesh Agent Rotation issue
« on: August 07, 2020, 04:34:13 PM »
Hi everyone, So i have been reading these forums and still thing doesn't work.

https://hutonggames.com/playmakerforum/index.php?topic=10245.0

https://hutonggames.com/playmakerforum/index.php?topic=2493.0

I need help with rotation on Navmesh agent. I already setup a few waypoint that navmesh agent go to the next waypoint... it's working ~ but the rotation and moving to next direction on each stop is having a problem (For example, character rotate first then move). I have done using Get Game Object Speed and Blendtree and it doesn't work.

Can someone do a small video tutorial for this? I am abit stuck with this now.

nuFF3

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 74
  • Are we even real?
    • One Month Studio
Re: NavMesh Agent Rotation issue
« Reply #1 on: August 08, 2020, 06:15:16 AM »
You can freely rotate a navmesh agent with "smooth look at" or any other that may override the rotation of the agent.
When I needed my guard AI to look around in random directions, I just used "smooth look at" for a smoother rotation. Heck, that's what I'm using when the guard is chasing the player.

san

  • Junior Playmaker
  • **
  • Posts: 93
Re: NavMesh Agent Rotation issue
« Reply #2 on: August 08, 2020, 04:12:35 PM »
Hi thanks for info ~! but i do have smooth look to player in combat situation.
For going one place to another place, smooth look might not be good cuz what if i have 170 degree that need to go and if there is obstacle in between the rotation will be weird position. Ai enemy will aways smooth look at next place and rotation will be not good.

So what i had done is i had a game object speed that controlling a Navmesh speed with float. Also i have blend tree that doing all 0 to 180/-180 degree then go to walk loop animation. But the issue is when Ai start going to next place the animation is skip the blend tree and go to walk loop mode.

But yes i can override with rotation of the agent if i want the enemy to go specific place then this is good ideas.