self:set_shape_capsule

Client

Assigns a capsule shape to the collision shape — the standard shape for humanoid character controllers


Syntax

local status = self:set_shape_capsule(
    radius,
    height
)

Parameters

TypeNameDescription
floatradiusCapsule radius to apply
floatheightCapsule height to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_shape_capsule(0.4, 1.8)

On this page