phy_kinematic

Returns whether the instance is a kinematic body or not.

Syntax:

GML Code Example

phy_kinematic;


Returns: Boolean


Description

This read-only variable will return true if the instance is classed as being a kinematic object, or false if it is not. A kinematic instance is one that has infinite mass (a density of 0) but can move. So, to make an instance kinematic, you would first create a static instance and then set one or more of the instance variables related to movement (ie: phy_speed_x).


Example:

GML Code Example

if !phy_kinematic
    {
    phy_speed_x = 5;
    }
 

The above code checks to see if the instance is kinematic and if it is not, it sets the horizontal speed to 5.





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