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:
myObject: ObjectcenterOfMass: PositionRelative - relative to the model centretime: Number - transition time, 0 for instant center of mass transfer
Returns: Nothing
Syntax 2
myObject setCenterOfMass centerOfMass
Parameters:
myObject: ObjectcenterOfMass: PositionRelative - relative to the model centre
Returns: Nothing
Examples
Example 1
myObject setCenterOfMass [[0,-1,0], 0.5];
Example 2
myObject setCenterOfMass [0,-1,0];