|
What is the meaning of Vector3.back?
(comments are locked)
|
|
There is no such command. Try instead -Vector3.forward. ;) It's not mentioned in the script reference, but this does compile and run for me in Unity 3.5.0f5: Shame the reference isn't more up to date, really. = It's only as useful as it is authoritative, IMO.
Apr 05 '12 at 03:09 AM
rutter
Actually it's deprecated. It was in Unity in the 1.x days. Obviously it's still technically in Unity, but not officially. Best not to use it. (Surprised it still works though.)
Apr 05 '12 at 03:12 AM
Eric5h5
Wow, thanks for that! Just tested and Vector3.back is indeed the same as -Vector3.forward ... also tested with Vector3.left ... same as -Vector3.right. I would never have known ...
Apr 05 '12 at 03:19 AM
Kleptomaniac
(comments are locked)
|
|
Neither of these are necessarily useful on their own, but they can be very useful in tandem with other code. Some simple examples: Those examples don't necessarily make sense out of context, unfortunately. The more you know about vector math, the more apparent the utility of these values should be. Remember that vectors express a direction and length. A unit vector, with length one, can be thought of as expressing a pure direction. That's very useful in game development.
(comments are locked)
|
|
It is shorthand for writing Vector3(0,0,-1)
(comments are locked)
|
