phy_collision_points

Returns the number of points of contact in a collision.

Syntax:

phy_collision_points;


Returns: Real


Description

This read-only variable returns the number of points of collision detected between the two objects in the collision.

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


Example:

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

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


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