- Home /
 
 
               Question by 
               TheShadyColombian · Jan 25, 2015 at 11:55 PM · 
                c#vector3vector3.distance  
              
 
              GameObject's transform in Vector3
I'm using Vector3.Distance but i want "a" to be the object that the script is attached to. how do i do this? c# please!
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by cdrandin · Jan 25, 2015 at 11:59 PM
 Vector3.Distance( obj.GetComponent<Script>().transform.position, Vector3.Forward);
 
               That is one way.
Thanks, but turns out that the problem was that i was putting "b" as a gameobject. but thanks!
Your answer
 
             Follow this Question
Related Questions
Shortest distance between two meshes/colliders 3 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How can i change a childs local position with a variable? 1 Answer