sm.body.createBody

Create a new body

Kind: Function

Environments: Game

Game

sm.body.createBody( position, rotation, isDynamic )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
position Vec3 The body's world position.
rotation (optional) Quat The body's world rotation. (Defaults to sm.quat.identity)
isDynamic (optional) boolean Set true if the body is dynamic or false if the body is static. (Defaults to true)

Returns:

Type Description
Body The created body