YaSpinnerComponent¶
YaSpinnerComponent
determines whether an object spin and the way it spins.
Functions¶
void PlayMoving(bool play)
|
Deterimines whether the object starts to spin. Set play to ture if you want to make the object spin.
|
void SetRotateSpeed(speed)
|
Sets the spin speed (m/s). |
number GetRotateSpeed()
|
Gets the spin speed (m/s). |
void SetTargetAngle(number angle)
|
Sets the target angle of the spin. The spin won't stop when the target is reached and the event `FinishRotate` is triggered. |
number GetTargetAngle()
|
Returns the target angel. |
Events¶
StartRotate
|
Triggered when the spin starts. |
StopRotate
|
Triggered when the spin pauses. |
FinishRotate
|
Triggered when the spin finishes. |
Code sample¶
This following code sample makes the object spin in the specified speed, around the specified axis, to the specified angle.
1 2 3 4 5 6 7 8 |
|