self:set_shape_sphere

Client

Assigns a sphere shape to the collision shape


Syntax

local status = self:set_shape_sphere(
    radius
)

Parameters

TypeNameDescription
floatradiusSphere radius to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_shape_sphere(0.5)

On this page