phy_collision_x

Returns the x position of a collision point.

Syntax:

GML Code Example

phy_collision_x;


Returns: Real


Description

This read-only array returns the x position of all points detected in a collision between two physics enabled instances.

NOTE: This variable is only available in the collision event of a physics enabled instance.


Example:

GML Code Example

var i;
 for(i = 0; i < phy_collision_points; i += 1;)
    {
    part_particles_create(global.Sname, phy_collision_x[i], phy_collision_y[i], global.Spark, 5);
    }
 

The above code creates particles at all the defined points of a collision between two physics enabled instances.





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