self:set_shape_separation_ray

Client

Assigns a separation ray shape to the collision shape, which helps a body smoothly stay on top of geometry without catching on edges


Syntax

local status = self:set_shape_separation_ray(
    length
)

Parameters

TypeNameDescription
floatlengthRay length to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_shape_separation_ray(1.0)

On this page