0

I'm following the Survival Shooter Tutorial on the Unity website, however, when I went to test if my 'Zombunny' was spawning correctly. It spawned fine, just as it should ... until I started shooting them , as soon as I killed my first enemy I got this error:

"SetDestination" can only be called on an active agent that has been placed on a NavMesh.

I've already tried re - baking my environment but that still didn't work.

iFallOffStuff
  • 57
  • 1
  • 2
  • 6
  • 1
    Can we see some of your code? Namely, where `SetDestination()` is called, and how you're destroying the "Zombunny"? – Serlite Sep 13 '16 at 20:44

1 Answers1

0

It seems that your enemy, even dead, wants to reach your player.

Are you sure you are destroying the enemy gameobject properly? Also if you correctly drop the enemy's health to 0 or less it should not happen in the context of the tutorial unless you forgot to add this (before calling navigation):

        if(enemyHealth.currentHealth > 0 && playerHealth.currentHealth > 0)
Augure
  • 360
  • 3
  • 13