phy_speed_y

此变量可用于获取或更改实例线性速度矢量的 Y 分量,并以每步像素数为单位定义 (对于每秒像素数,请参见 phy_linear_velocity_y})。对于静态实例 (即密度为 0 的实例),更改此变量将使其变为运动学实例。

 

语法:

phy_speed_y;

 

返回:

Real (single precision floating point value, or undefined if the instance is not physics enabled)

 

例子:

if (phy_speed_y != 0)
{
    phy_speed_y = 0;
}

上述代码将检查线性速度矢量的 Y 分量,如果它不是 0,则将其设置为 0。