- Home /
Get list of updating transforms
At the moment, I am using Players=GameObject.FindGameObjectWithTag("Player"); to find a list of gameobjects that I can use as targets. However, whenever the enemy moves towards the pos of the gameobject, it just goes to the position of the gameobject when it was added to Players. Can you get updated positions from gameObjects, and if so, how?
I think we need to see your code. I assume you are using 'FindGameObjectsWithTag' with an 's' on 'Objects'. The array contains a reference to the game objects, so Players[0].transform.position will refer to the current position of that game object.
Sorry! It turns out that that wasn't the problem. It's fine now!
Your answer
Follow this Question
Related Questions
2 Simple Questions. The Questions Are Comments In The Code 1 Answer
Float variable not even updating? 1 Answer
Verctor3 isnt updating with variables 1 Answer
Child Transform 1 Answer