YaForcerComponentcontrols the force acted on the player and its effect.
YaForcerComponentcan only function when the Forcer module (https://developer.yahaha.com/manual/yahaha-studio-manual/scripting/module/module-reference/Forcer/) is added to the same object.
void Execute(number entityID)¶
Which player being forced by id
void Execute(YaEntity entity)¶
which player being forced by entity
void SetInitialSpeed(number speed)¶
Sets the initial speed (m/s).
void SetForce(number force)¶
Specifies the force acted on the player. If the force is lager than fraction (10 N), the player moves with constant acceleration motion. If the force is smaller than the fraction (10 N), the player moves with constant deceleration motion.
void SetDirection(float3 direction)¶
Set the real-time direction of the movement.
directionglobal direction vector
Gets the real-time speed (m/s).
Gets the real-time force.
Gets the real-time direction of the movement.