self:set_shape_box

Client

Assigns a box shape to the collision shape


Syntax

local status = self:set_shape_box(
    size
)

Parameters

TypeNameDescription
vector3sizeBox dimensions to apply as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set a box shape on a collision shape
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)

entity:set_shape_box({1, 1, 1})

On this page