natiny.physics.plane

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

Creates a static, flat rectangle in the XZ plane: the ground.

Parameters

Name Type Default Description
w number 1 Width, the full size along X
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 ground = natiny.physics.plane(50, 50)