Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

AIThirdPersonController rotates at target object

Discussion in 'Navigation' started by bboydaisuke, May 9, 2015.

  1. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Hi there,

    I guess everyone uses Auto Breaking option for Navmesh because it keeps rotating after the character reaches the target.
    AutoBreaking doesn't work as I expected for me. It stops once but after one or two seconds, it start walking again and rotates on the goal.

    What I did is this:
    1. Open new scene
    2. put plane at (0, 0, 0)
    3. put AIThirdPersonController at (0, 0, 0)
    4. put empty GameObject at (4, 1.5, 0)
    5. Assign empty GameObject to Target for AICharacterContol of AIThirdPersonController
    6. Configure NavMeshAgent as follow:
    Radius 0.5
    Speed 0.7
    Stopping Distance: 1.5
    Auto Breaking: checked
    7. Open navigation window and bake plane object as "Navigation Static" checked
    8. Run

    Then the character walks towards object and stops. And few seconds later, charater starts shaking and walks again then starts spinning at the goal.
    Though I thought I had to disable the object when the character stops, Unity's sample project doesn't look like doing like that.
    How can I stop the character and stop the rotation?

    thanks,
    bboydaisuke
     
    Last edited: May 9, 2015
  2. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Further investigation:
    I disabled Auto Breaking in Sample project but character still stops before it reaches the target. Seems like it forces stop the character in the project (not disabling NavMeshAgent). So there must be some tricks in the sample project in order to stop the character.
     
  3. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Changed the thread title.
     
  4. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Partially solved.
    I imported "GroundExtents" from sample project, added it to the plane, bake plane, and run. Then character stops as sample project.
    Still not sure why "GroundExtents" stops the character.