A newer version of Max is available. Click here to access the latest version of the documentation

jit.gl.physdraw Reference

A physics opengl debug drawer



The jit.gl.physdraw object performs debug drawing of the objects in a physics simulation, including jit.phys.body, jit.phys.multiple, and constraint objects such as jit.phys.hinge and jit.phys.6dof. A valid opengl context and a valid jit.phys.world context are required for debug drawing of the physics world.


physics opengl debug drawer


This object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. Additionally it can reference the name of a jit.gl.node sub-context. This value may also be set via the OB3D drawto attribute. If no argument is present, the object is implicitly added to the first valid drawing context or sub-context found in the current patch or by searching up the patcher hierarchy.


constraintsize [float]

Set the size for drawing contraints in the physics world (default = 2).

contactsize [float]

Set the size for drawing contact points and vectors in the physics world (default = 6).

draw_aabb [int]

Enable drawing of the physics object's aabb (axis-aligned bounding box) (default = 0).

draw_bodies [int]

Enable rigid body drawing (default = 1).

draw_worldbox [int]

Enable worldbox drawing (default = 1).

rgb [int]

Drawer color flag (default = 1). When the flag is set, drawer uses RGB colors. Otherwise, the color attribute determines the color used.

worldname [symbol]

The name of a jit.phys.world context this drawer is bound to.

Common Box Attributes

OB3D Attributes


OB3D Messages

See Also

Name Description
Working with OpenGL Working with OpenGL