Skip to content

YaForcerComponent

YaForcerComponent controls the force acted on the player and its effect.

Functions

void SetSpeed(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)
Sets the direction of the movement.
number GetSpeed()
Gets the real-time speed (m/s).
number GetForce()
Gets the real-time force.
float3 GetDirection()
Gets the real-time direction of the movement.