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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

[SOLVED] Rotate a ball around it self, that has a NavMeshAgent component?

Discussion in 'Navigation' started by Inferi, May 5, 2018.

  1. Inferi

    Inferi

    Joined:
    Sep 28, 2015
    Posts:
    145
    Hello again :)

    I have a ordinary ball that has a NavMeshAgent on it.
    I also have a Rigidbody on it.

    I want the ball to rotate in the traveling direction like a real ball would do, but it seems that NavMeshAgent do not allow this in the normal way.

    The NavMeshAgent should still do the moving/translate of the ball and I just want to do the rotation of the ball.


    I have been trying to give the Rigidbody a AddTorque and tried to Rotate and RotateAround the transform.

    Searched the internet but dont seem to be a answer around.

    Anyone know a solution?
     
  2. Inferi

    Inferi

    Joined:
    Sep 28, 2015
    Posts:
    145
    I think I have solved it. Be back with results.
     
  3. Inferi

    Inferi

    Joined:
    Sep 28, 2015
    Posts:
    145
    No, the solution I had in mind, did not work :(
     
  4. Inferi

    Inferi

    Joined:
    Sep 28, 2015
    Posts:
    145
    Fixed it. I made a animation of the ball rolling forward in place.