self:set_visible

Client

Sets whether the collision shape is visible


Syntax

local status = self:set_visible(
    visible
)

Parameters

TypeNameDescription
boolvisibletrue to show the entity, false to hide it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Toggle visibility of a collision shape
local entity = physics.collision_shape.create()

entity:set_visible(false)

On this page