Search Unity

[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.