Arma 3 Scripting

Command in PhysX

setCenterOfMass

Also available as Markdown and JSON, or read the original wiki page.

Description

Changes the center of mass of an object smoothly during the given time (in seconds). A time of zero (or using the alternative syntax) means an immediate change.

Syntax

Syntax 1

myObject setCenterOfMass [centerOfMass, time]

Parameters:

Returns: Nothing

Syntax 2

myObject setCenterOfMass centerOfMass

Parameters:

Returns: Nothing

Examples

Example 1

myObject setCenterOfMass [[0,-1,0], 0.5];

Example 2

myObject setCenterOfMass [0,-1,0];

See also

getCenterOfMass · setMass · getMass