self:set_shape_box
Client
Assigns a box shape to the collision shape
Syntax
local status = self:set_shape_box(
size
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | size | Box dimensions to apply as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)
entity:set_shape_box({1, 1, 1})