getCenterOfMass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (global args)
(format)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns center of mass of a PhysX object. |= Description
| Returns center of mass of an object. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''getCenterOfMass''' object |= Syntax
| '''getCenterOfMass''' object |= Syntax


|p1= object: [[Object]] |= PARAMETER1   
|p1= object: [[Object]] - PhysX object |= PARAMETER1   


| [[Array]] - [x,y,z] offset relative to the model centre |= RETURNVALUE  
| [[Array]] - [x,y,z] offset relative to the model centre |= RETURNVALUE  




|x1= <code>_com = getCenterOfMass _myCar</code>|= EXAMPLE1  
|x1= <code>_com = [[getCenterOfMass]] _myCar;</code>|= EXAMPLE1  


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[getMass]], [[setCenterOfMass]], [[setMass]] |= SEEALSO  
| [[getMass]], [[setCenterOfMass]], [[setMass]], [[addTorque]], [[addForce]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 23:16, 10 June 2017

Hover & click on the images for description

Description

Description:
Returns center of mass of an object.
Groups:
Uncategorised

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