December 2011
Beginner
488 pages
11h 47m
English
To actually use these variables to move an object, we will use the Translate command. When implementing any piece of scripting, you should make sure you know how to use it first.
Translate is a command which is part of the Transform class: http://unity3d.com/support/documentation/ScriptReference/Transform.html.
This is a class of information that stores the position, rotation, and scale properties of an object, and also functions that can be used to move and rotate the object.
The expected usage of Translate is as follows:
Transform.Translate(Vector3);
The use of Vector3 here means that Translate is expecting a piece of Vector3 data as it's the main argument—Vector3 data is simply information that contains a value for the X, ...
Read now
Unlock full access