as in the video navMeshAgent.enabled = !health.IsDead(); I wrote the code, but the blend tree does not work correctly when the game starts. The player and the enemies are walking in idle state. The value of the forwardSpeed parameter does not change.
Have you assigned the navMeshAgent variable?
void Awake()
{
navMeshAgent = GetComponent<NavMeshAgent>();
}
I missed the obvious in my question… there are two potential nulls in the method… health.IsDead… I don’t see the reference to health being initialized.
Yes, I forgot to initialize health. Thank you for your help
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.