phy_position_yprevious

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

Syntax:

GML Code Example

phy_position_yprevious;


Returns: Real


Description

This variable can be used to get (or to set) the previous y 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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here