setCenterOfMass: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (see also) |
(syntax, example) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Changes the center of mass of an object smoothly during the given time (in seconds). A time of zero means an immediate change. |= 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. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 14: | Line 14: | ||
|p1= myObject: [[Object]] |= PARAMETER1 | |p1= myObject: [[Object]] |= PARAMETER1 | ||
|p2= com | |p2= com: [[Array]] - vector|= PARAMETER2 | ||
|p3= time: [[Number]] |= PARAMETER3 | |p3= time: [[Number]] |= PARAMETER3 | ||
| [[Nothing]] |= RETURNVALUE | | [[Nothing]] |= RETURNVALUE | ||
____________________________________________________________________________________________ | |||
|s2= myObject '''setCenterOfMass''' com |= | |||
|p21= myObject: [[Object]] |= PARAMETER21 | |||
|p22= com: [[Array]] - vector |= PARAMETER22 | |||
|r2= [[Nothing]]|= | |||
____________________________________________________________________________________________ | |||
|x1= <code>myObject setCenterOfMass <nowiki>[[</nowiki>0,-1,0],0.5<nowiki>]</nowiki>;</code>|= EXAMPLE1 | |x1= <code>myObject setCenterOfMass <nowiki>[[</nowiki>0,-1,0],0.5<nowiki>]</nowiki>;</code>|= EXAMPLE1 | ||
|x2= <code>myObject setCenterOfMass [0,-1,0];</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 10:56, 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 - 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