Hi everyone!
I need to do simple thing: When something happens my object need to stop moving. So i make NavMeshAgent.isStopped = true. This code is in update method.
NavAgent.isStopped = true;
easyAnimator.SetBooleanTrue("isJumpAttacking");
if (startJumping)
{
NavAgent.isStopped = false;
NavAgent.SetDestination(Vector3.zero);
startJumping = false;
}
After it’s stopped it fires animation and wait till flag startJumping is true. After i want to start movement again with another path (Vector.zero is just a sample of such path). This does not work! What does work? This:
NavAgent.isStopped = true;
NavAgent.isStopped = false;
easyAnimator.SetBooleanTrue("isJumpAttacking");
if (startJumping)
{
NavAgent.SetDestination(Vector3.zero);
startJumping = false;
}
I have one question… why? xD