self:set_debug_visible

Client

Shows or hides a live wireframe outline of the collision shape's current geometry — the wireframe automatically moves with the shape and updates whenever its size is changed. Not supported for world boundary or separation ray shapes.


Syntax

local status = self:set_debug_visible(
    state
)

Parameters

TypeNameDescription
boolstatetrue to show the wireframe, false to hide it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Show the debug wireframe on a collision shape
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)
entity:set_shape_box({1, 1, 1})

entity:set_debug_visible(true)

On this page