getCenterOfMass: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 8: | Line 7: | ||
|gr1= Object Manipulation |GROUP1= | |gr1= Object Manipulation |GROUP1= | ||
| Returns center of mass of an object. |DESCRIPTION= | | Returns center of mass of an object. |DESCRIPTION= | ||
| '''getCenterOfMass''' object |SYNTAX= | | '''getCenterOfMass''' object |SYNTAX= | ||
Line 22: | Line 19: | ||
|x1= <code>_com = [[getCenterOfMass]] _myCar;</code>|EXAMPLE1= | |x1= <code>_com = [[getCenterOfMass]] _myCar;</code>|EXAMPLE1= | ||
| [[getMass]], [[setCenterOfMass]], [[setMass]], [[addTorque]], [[addForce]] |SEEALSO= | | [[getMass]], [[setCenterOfMass]], [[setMass]], [[addTorque]], [[addForce]] |SEEALSO= | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= | ||
}} | }} | ||
Revision as of 02:14, 17 January 2021
Description
- Description:
- Returns center of mass of an object.
- Groups:
- Object Manipulation
Syntax
- Syntax:
- getCenterOfMass object
- Parameters:
- object: Object - PhysX object
- Return Value:
- Array - [x,y,z] offset relative to the model centre
Examples
- Example 1:
_com = getCenterOfMass _myCar;
Additional Information
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