phy_linear_velocity_y

The y component of the velocity vector.

Syntax:

phy_linear_velocity_y;


Returns: Real


Description

This variable can be used to get or to change the y component the instances linear velocity vector and is defined in pixels per second (for pixels per step, see phy_speed_y). Altering this for a static instance (ie: an instance with 0 density) will turn it into a kinematic instance.


Example:

if phy_linear_velocity_y != 0
   {
   phy_linear_velocity_y = 0;
   }

The above code will check the y component of the linear velocity vector and if it is anything other than 0 it will set it to 0.


Back: Physics Variables
next: phy_linear_damping
© Copyright YoYo Games Ltd. 2019 All Rights Reserved