phy_position_xprevious

The previous x position of the instance in the physics world.

Syntax:

phy_position_xprevious;


Returns: Real


Description

This variable can be used to get (or to set) the previous x position of the instance within the game room physics world. This is the position of the instance within the physics world in the previous step to the current one.


Example:

xx = phy_position_xprevious;
yy = phy_position_yprevious;

The above code stores the previous x and y position for the physics enabled instance in two variables.


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