Tweener
This component belongs to the following package:
- com.yahaha.sdk.props
The Tweener component is used for creating and handling tween animations of the object. It offers fine-grained control over position, rotation, and scale animations with various configuration options.
Properties
- Active Config on Start: Specify the index of the tween to play on start (1-based index). Set to 0 to disable auto-start.
- Duration: Animation length in seconds (range: 0 to infinity). Default: 1.
- Is Independent Update: If enabled, animation updates at a constant rate, unaffected by time scale or game pauses. For example, animations continue to progress when the game is paused.
- Tween Position: Determines whether to tween the position of this object. Default: false.
- Position: The (target) position of this tween animation. By default the value is in world space.
- Is Delta: If true, the position is treated as delta position, which will move the object by the amount. Default: false
- Is Local: Determines whether the position is in world space or local space. Default: false.
- Tween Rotation: Determines whether to tween the rotation of this object. Default: false.
- Rotation: The (target) rotation in Euler angles of this tween animation. By default the value is in world space, and the tween follows the fastest way that never rotates beyond 180°
- Is Delta: If enabled, the rotation is treated as an offset from the current rotation. D. Tween over 180° is allowed hence. Disabled by default.
- Is Local: If enabled, the rotation is in object's local space; if false, in world space. Disabled by default.
- Tween Scale: Determines whether to tween the scale of this object. Default: false.
- Scale: The (target) scale of this tween animation.
- Is Multiplier: If enabled, the scale value will be multiplied by the object's current transform scale; if disabled, it sets absolute scale.
Trigger
Actions:
- TweenPosition: Tween the object's position to the specified target over a defined duration.
- Arguments:
- target: Vector3
- duration: float
- isLocal: boolean
- Arguments:
- TweenPositionDelta: Tween the object's position by adding the specified delta over a defined duration.
- Arguments:
- delta: Vector3
- duration: float
- isLocal: boolean
- Arguments:
- TweenRotation: Tween the object's rotation to the specified target over a defined duration.
- Arguments:
- target: Vector3
- duration: float
- isLocal: boolean
- Arguments:
- TweenRotationDelta: Tween the object's rotation by adding the specified delta over a defined duration.
- Arguments:
- delta: Vector3
- duration: float
- isLocal: boolean
- Arguments:
- TweenScale: Tween the object's scale to the specified target over a defined duration.
- Arguments:
- target: Vector3
- duration: float
- Arguments:
- TweenScaleMutiplier: Tween the object's scale by multiplying the current scale with the specified multiplier over a defined duration.
- Arguments:
- mutiplier: Vector3
- duration: float
- Arguments:
- Handle: Manage tweens by accessing the specified index.
- Arguments:
- index: integer
- Arguments: