YaMoverComponent¶
YaMoverComponent
determines whether an object moves and the way it moves.
Functions¶
void PlayMoving(bool play)
|
Determines whether the object moves. Set play to ture if you want to make the object move.
|
void SetMoveSpeed(number speed)
|
Sets the movement speed (m/s). |
number GetMoveSpeed()
|
Gets the movement speed (m/s). |
void SetTargetPosition(float3 targetPosition)
|
Sets the target position of the movement. |
float3 GetTargetPosition()
|
Gets the target position of the movement. |
Events¶
StartMoving
|
Triggered when the movement starts. |
StopMoving
|
Triggered when the movement pauses. |
FinishMoving
|
Triggered when the movement finishes. |
Code sample¶
This following code sample makes the object move in the specified speed to the specified position.
1 2 3 4 5 6 7 8 |
|