Collision Shape

self:set_debug_visible

Client

Shows or hides the debug wireframe of the collision shape

Syntax

local status = self:set_debug_visible(
    state
)

Wireframe color shows whether the shape is replicated.

  • Replicated — orange wireframe, the shape sits on an entity that is synced from the server, so it exists for every player.
  • Not replicated — green wireframe, the shape sits on a local entity created by a client-side script and is only present on this client.

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