I’m working through the Survival Shooter Tutorial for Unity 5.x - using the PDF adjustments. I have just finished adding the first enemy, who uses a Nav Mesh Agent to chase the player.
When I ran the program the enemy simply moved towards the origin point.
The player’'s position is identified in the zombunny’s controller script by the line
“player = GameObject.FindGameObjectWithTag(“Player”).transform;” in awake
and “player.postion;” in update
So the first thing i tried doing was to log the player position.
The debug log kept returning even when i moved the player (0.0, 0.0, 0.0) so I tried changing both the player’s tag and the searched for tag to “PlayerActual”, this worked and made the zombunny chase the player.
I wanted to see what was wrong with the original however so I tried returning the code to it’s original state and adding a new line using the FindGameObjectsWithTag command instead, this found a list of 6 objects (the last of which was my player)
The other 5 objects do not move from origin, i don’t know how to find out other information about them. But the thing I’ve checked the project heirarchy and there is no other object in it with the player tag (i’ve even checked all the child objects of things like “Environment”).
So my question is how can i find out more about these other objects, or how can i get rid of them?
Many thanks,
Martha
p.s. I can upload my project if that’d be handy