physics.collision_shape.create

Client

Creates a new collision shape instance and attaches it to a physics body or area


Syntax

local instance = physics.collision_shape.create(
    owner
)

Parameters

TypeNameDescription
objectownerPhysics body or area instance to attach the shape to

Returns

TypeNameDescription
objectinstanceCreated collision shape instance

Examples

Create a collision shape instance
local body = physics.rigid.create()
local entity = physics.collision_shape.create(body)

entity:set_shape_box({1, 1, 1})

On this page