Difference between revisions of "CutsceneCmdTranslate"
(Initial page) |
(Adding API information and categories) |
||
Line 1: | Line 1: | ||
This will move the target object to a different target location, taking the amount of time specified. | This will move the target object to a different target location, taking the amount of time specified. | ||
+ | == Public Variables == | ||
+ | === targetPoint : Transform === | ||
+ | This is the point in space to which the object that is moving will travel to when the cutscene starts. It must be assigned in the editor. | ||
+ | === moverObject : Transform === | ||
+ | This is the object that is moved. It must be assigned in the editor. | ||
+ | === moveTime : float === | ||
+ | This is how long it will take the object to move from its starting position to the targetPoint. This setting affects the speed of the movement. | ||
+ | === alignToTarget : bool === | ||
+ | This determines whether or not the object will rotate while moving to face the target point. | ||
+ | === is2dScene : bool === | ||
+ | This only has any effect if alignToTarget is set to true. It will determine how the alignment rotation is calculated. The alignment is calculated using [http://docs.unity3d.com/Documentation/ScriptReference/Quaternion.LookRotation.html Quaternion.LookRotation]. | ||
+ | |||
+ | In a 2d scene, the upwards vector is set to the direction vector, and [http://docs.unity3d.com/Documentation/ScriptReference/Vector3-forward.html Vector3.forward] is used as the forward vector. | ||
+ | |||
+ | In a 3d scene, the upwards vector is set to [http://docs.unity3d.com/Documentation/ScriptReference/Vector3-up.html Vector3.up], and the direction vector is used as the forward vector. | ||
+ | === rotateSpeed : float === | ||
+ | Only used if alignToTarget is true. This determines how fast the object will rotate to face the target. It's possible that if this is set too slow, the rotation will not complete before the translation completes. | ||
+ | === savePositionEveryStart : bool === | ||
+ | If set to true, every time the cutscene is [[Cutscene#public_event_CutsceneNotification_OnCutsceneStart|started]], the position and rotation of the object is saved. This is only useful if used in conjunction with restoreTargetOnReset. | ||
+ | === restoreTargetOnReset : bool === | ||
+ | If set to true, when the cutscene is [[Cutscene#public_event_CutsceneNotification_OnCutsceneReset|reset]], the position and rotation of the object will be set to what was last saved as the starting position and rotation of the object. | ||
+ | |||
+ | [[Category:API]] | ||
[[Category:Cutscene Framework]] | [[Category:Cutscene Framework]] | ||
+ | [[Category:Premium Scripts]] |
Latest revision as of 16:43, 15 April 2013
This will move the target object to a different target location, taking the amount of time specified.
Contents |
[edit] Public Variables
[edit] targetPoint : Transform
This is the point in space to which the object that is moving will travel to when the cutscene starts. It must be assigned in the editor.
[edit] moverObject : Transform
This is the object that is moved. It must be assigned in the editor.
[edit] moveTime : float
This is how long it will take the object to move from its starting position to the targetPoint. This setting affects the speed of the movement.
[edit] alignToTarget : bool
This determines whether or not the object will rotate while moving to face the target point.
[edit] is2dScene : bool
This only has any effect if alignToTarget is set to true. It will determine how the alignment rotation is calculated. The alignment is calculated using Quaternion.LookRotation.
In a 2d scene, the upwards vector is set to the direction vector, and Vector3.forward is used as the forward vector.
In a 3d scene, the upwards vector is set to Vector3.up, and the direction vector is used as the forward vector.
[edit] rotateSpeed : float
Only used if alignToTarget is true. This determines how fast the object will rotate to face the target. It's possible that if this is set too slow, the rotation will not complete before the translation completes.
[edit] savePositionEveryStart : bool
If set to true, every time the cutscene is started, the position and rotation of the object is saved. This is only useful if used in conjunction with restoreTargetOnReset.
[edit] restoreTargetOnReset : bool
If set to true, when the cutscene is reset, the position and rotation of the object will be set to what was last saved as the starting position and rotation of the object.