Difference between revisions of "CutsceneCmdRotate"
From Headbone Creative
(Initial page) |
(Adding API information and categories) |
||
Line 1: | Line 1: | ||
This will rotate the target object to either look at the specified lookAtTarget, or by the specified number of degrees around the upAxis if no lookAtTarget is given. | This will rotate the target object to either look at the specified lookAtTarget, or by the specified number of degrees around the upAxis if no lookAtTarget is given. | ||
+ | == Public Variables == | ||
+ | === target : Transform === | ||
+ | This is the object that is rotated. It must be assigned in the editor. | ||
+ | === lookAtTarget : Transform === | ||
+ | This may be assigned in the editor. If this is set, the object will be rotated to look towards this object. See: [http://docs.unity3d.com/Documentation/ScriptReference/Transform.LookAt.html Transform.LookAt] | ||
+ | === rotateDegrees : float === | ||
+ | This is how many degrees to rotate around the upAxis if lookAtTarget isn't set. | ||
+ | === upAxis : Vector3 === | ||
+ | The axis to use for the "up" direction. In general, this should be set to [http://docs.unity3d.com/Documentation/ScriptReference/Vector3-forward.html Vector3.forward] for 2d usage and [http://docs.unity3d.com/Documentation/ScriptReference/Vector3-up.html Vector3.up] for 3d usage. | ||
+ | === rotateTime : float === | ||
+ | This is the time in seconds to spend rotating the object. | ||
+ | |||
+ | |||
+ | [[Category:API]] | ||
[[Category:Cutscene Framework]] | [[Category:Cutscene Framework]] | ||
+ | [[Category:Premium Scripts]] |
Latest revision as of 04:10, 15 April 2013
This will rotate the target object to either look at the specified lookAtTarget, or by the specified number of degrees around the upAxis if no lookAtTarget is given.
Contents |
[edit] Public Variables
[edit] target : Transform
This is the object that is rotated. It must be assigned in the editor.
[edit] lookAtTarget : Transform
This may be assigned in the editor. If this is set, the object will be rotated to look towards this object. See: Transform.LookAt
[edit] rotateDegrees : float
This is how many degrees to rotate around the upAxis if lookAtTarget isn't set.
[edit] upAxis : Vector3
The axis to use for the "up" direction. In general, this should be set to Vector3.forward for 2d usage and Vector3.up for 3d usage.
[edit] rotateTime : float
This is the time in seconds to spend rotating the object.