natiny.physics.cube

Lua
natiny.physics.cube([w [, h [, d]]]) -> body

Creates a dynamic box-shaped body at the world origin.

Parameters

Name Type Default Description
w number 1 Width, the full size along X
h number w Height, the full size along Y
d number w Depth, the full size along Z

Returns

Type Description
number Body handle, also usable as an entity handle; raises an error on failure

Example

Lua
local body = natiny.physics.cube(1, 1, 1)