self:set_shape_world_boundary

Client

Assigns an infinite boundary plane shape to the collision shape — useful for kill-floors or world edges


Syntax

local status = self:set_shape_world_boundary(
    plane_normal,
    plane_distance = 0
)

Parameters

TypeNameDescription
vector3plane_normalNormal of the infinite boundary plane as {x, y, z}
floatplane_distanceDistance of the plane from the origin along its normal

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_shape_world_boundary({0, 1, 0}, 0)

On this page