how can i get the camera vector where is looking at in world position?
example if the camera is looking at +X i would like to get the vector3 (1,0,0)
thanks.
1 Answer
1You need to get the Gameobject and then use
CameraVector = CameraGO.transform.forward;
(untested)
this will return the Vector3
http://docs.unity3d.com/ScriptReference/Transform.html http://docs.unity3d.com/ScriptReference/Transform-forward.html
– AlucardJay