physics.getDebugErrorsEnabled()

Type Function
Library physics.*
Return value Boolean
Revision Release 2022.3683
Keywords Box2D, internal, asserts, run-time, error
See also physics.setDebugErrorsEnabled()

Overview

This function is used to determine if extra physics errors are allowed to be caught by Box2D.

Gotchas

This feature is currently available only in the Mac simulator.

Returns

Syntax

physics.getDebugErrorsEnabled()

Example

-- Toggle physics errors for debugging.
if ( physics.getDebugErrorsEnabled() ) then

    physics.setDebugErrorsEnabled( false )

else

    physics.setDebugErrorsEnabled( true )

end