setCenterOfMass

From Bohemia Interactive Community
Revision as of 10:56, 5 February 2014 by Master85 (talk | contribs) (syntax, example)
Jump to navigation Jump to search
Hover & click on the images for description

Description

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.
Groups:
Uncategorised

Syntax

Syntax:
myObject setCenterOfMass [com, time]
Parameters:
myObject: Object
com: Array - vector
time: Number
Return Value:
Nothing

Alternative Syntax

Syntax:
myObject setCenterOfMass com
Parameters:
myObject: Object
com: Array - vector
Return Value:
Nothing

Examples

Example 1:
myObject setCenterOfMass [[0,-1,0],0.5];
Example 2:
myObject setCenterOfMass [0,-1,0];

Additional Information

See also:
getCenterOfMasssetMassgetMass

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section