physics_draw_debug

This function draws a basic schematic of the physics properties for the instance.

Syntax:

GML Code Example

physics_draw_debug()

Returns: N/A


Description

When creating a physics system in GameMaker: Studio, it is often important to have a visual representation of what is actually happening with an instance. This can be achieved by using physics_draw_debug, which draws a schematic outline of the physical properties associated with the instance running the code. Here is an image of how it looks:

It should be noted that for this to work it must be in the draw event of the instance, and it will be drawn using the currently defined draw colour.


Example:

GML Code Example

draw_set_colour(c_red);
 physics_draw_debug();
 

The code above will draw a representation of the physical properties associated with that instance using the colour red.





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