Question by
noahyeates · Jan 02, 2018 at 11:27 AM ·
vector2converting-var-type-to-other-var-type
How convert the position of an object to a vector2
I currently have Player = GameObject.FindWithTag("player").transform.position; Enemy = GameObject.FindWithTag("enemy").transform.position;
and I need to subtract the positions from each other but as 'Player' and 'Enemy are objects I cannot. How do I get these into vector form so I can subtract them?
Comment
Your answer
Follow this Question
Related Questions
Is there an int based class/struct like Vector2? 4 Answers
Unity Error Script Vector2 0 Answers
Absolute direction Vector2D 0 Answers