Difference between revisions of "B2.DebugDraw:setFlags"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
m (Text replacement - "<source" to "<syntaxhighlight")
 
Line 16: Line 16:
  
 
Because Lua doesn't support bitwise operations by default, you can use "|" operator to combine flags.
 
Because Lua doesn't support bitwise operations by default, you can use "|" operator to combine flags.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
b2.DebugDraw:setFlags(flags)
 
b2.DebugDraw:setFlags(flags)
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 24: Line 24:
  
 
=== Examples ===
 
=== Examples ===
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
local debugDraw = b2.DebugDraw.new()
 
local debugDraw = b2.DebugDraw.new()
 
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT | b2.DebugDraw.JOINT_BIT)
 
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT | b2.DebugDraw.JOINT_BIT)

Latest revision as of 18:00, 12 July 2023


Available since: Gideros 2011.6
Class: b2.DebugDraw

Description

Sets the debug drawing flags. These flags are available:

b2.DebugDraw.SHAPE_BIT is set by default.

Because Lua doesn't support bitwise operations by default, you can use "|" operator to combine flags.

b2.DebugDraw:setFlags(flags)

Parameters

flags: (number) debug draw flags

Examples

local debugDraw = b2.DebugDraw.new()
debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT | b2.DebugDraw.JOINT_BIT)





LiquidFun