phy_com_x

The x position of the center of mass.

Syntax:

phy_com_x;


Returns: Real


Description

This read-only variable will return the x position of the instances center of mass. This is calculated automatically based on the density, inertia and mass of the instance as defined by the appropriate functions.


Example:

xx = phy_com_x;
yy = phy_com_y;

The above code sets two variables to the x and y position of the instances center of mass.


Back: Physics Variables
next: phy_com_y
© Copyright YoYo Games Ltd. 2018 All Rights Reserved