getCenterOfMass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
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

Hover & click on the images for description

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

See also:
getMasssetCenterOfMasssetMassaddTorqueaddForce

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