physics_particle_delete_region_box

With this function you can delete (remove) all the particles that fall within the bounds of the defined rectangular area from the physics simulation in the current room. The function takes the x and y position for the center of the area to delete as well as the half width and height of the rectangle (in pixels) which defines the area.

 

Syntax:

physics_particle_delete_region_box(x, y, halfWidth, halfHeight)

ArgumentTypeDescription
xRealThe x position of the center of the area to delete.
yRealThe y position of the center of the area to delete.
halfWidthRealThe half width of the rectangle.
halfHeightRealThe half height of the rectangle.

 

Returns:

N/A

 

Example:

physics_particle_delete_region_box(mouse_x, mouse_y, 32, 32);

The above code will delete all particles found in a rectangular area around the mouse position.