CutsceneCmdTranslate

From Headbone Creative
Revision as of 16:43, 15 April 2013 by Tyson Joehler (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This will move the target object to a different target location, taking the amount of time specified.

Contents

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 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.

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 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 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.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox