physics.animatable.create

Client

Creates a new animatable body instance and adds it to the scene


Syntax

local instance = physics.animatable.create()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
objectinstanceCreated animatable body instance

Examples

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

shape:set_shape_box({4, 1, 8})
entity:set_sync_to_physics(true)

On this page