setCenterOfMass: Difference between revisions
Jump to navigation
Jump to search
(syntax, example) |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 14: | Line 14: | ||
|p1= myObject: [[Object]] |= PARAMETER1 | |p1= myObject: [[Object]] |= PARAMETER1 | ||
|p2= com: [[Array]] - | |p2= com: [[Array]] - [x,y,z] offset relative to the model centre|= PARAMETER2 | ||
|p3= time: [[Number]] |= PARAMETER3 | |p3= time: [[Number]] |= PARAMETER3 | ||
Line 25: | Line 25: | ||
|p21= myObject: [[Object]] |= PARAMETER21 | |p21= myObject: [[Object]] |= PARAMETER21 | ||
|p22= com: [[Array]] - | |p22= com: [[Array]] - [x,y,z] offset relative to the model centre |= PARAMETER22 | ||
|r2= [[Nothing]]|= | |r2= [[Nothing]]|= |
Revision as of 11:50, 5 February 2014
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 - [x,y,z] offset relative to the model centre
- time: Number
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- myObject setCenterOfMass com
- Parameters:
- myObject: Object
- com: Array - [x,y,z] offset relative to the model centre
- 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