Just curious why you don’t just remove the nave mesh agent on death rather then always checking on update?
I put my last line in the Die() function of Health to: navMeshAgent.enabled = false;
Just curious why you don’t just remove the nave mesh agent on death rather then always checking on update?
I put my last line in the Die() function of Health to: navMeshAgent.enabled = false;
In the last course in the series, we introduce proper methods of respawning (well, the player, but easily applied to the enemies). If we destroy the NavMeshAgent, this won’t be possible. Disabling it in Die() is sufficient, then it just needs to be re-enabled.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.