addTorque: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
m (template:command argument fix) |
||
Line 10: | Line 10: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| object '''addTorque''' torque |SYNTAX= | | object '''addTorque''' torque |SYNTAX= | ||
|p1= object: [[Object]] - PhysX object|= | |p1= object: [[Object]] - PhysX object|PARAMETER1= | ||
|p2= torque: [[Array]] - world vector in format [x,y,z] |= | |p2= torque: [[Array]] - world vector in format [x,y,z] |PARAMETER2= | ||
|p3= |= | |p3= |PARAMETER3= | ||
|p4= |= | |p4= |PARAMETER4= | ||
|p5= |= | |p5= |PARAMETER5= | ||
|p6= |= | |p6= |PARAMETER6= | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= Apply torque [1000,0,0] to object not factoring object positioning: | |x1= Apply torque [1000,0,0] to object not factoring object positioning: | ||
<code>_wheel [[addTorque]] [1000,0,0];</code>|= | <code>_wheel [[addTorque]] [1000,0,0];</code>|EXAMPLE1= | ||
|x2= Apply torque [1000,0,0] relative to object: | |x2= Apply torque [1000,0,0] relative to object: | ||
<code>_wheel [[addTorque]] (_wheel [[vectorModelToWorld]] [1000,0,0]);</code>|= | <code>_wheel [[addTorque]] (_wheel [[vectorModelToWorld]] [1000,0,0]);</code>|EXAMPLE2= | ||
|[[addForce]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] |SEEALSO= | |[[addForce]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] |SEEALSO= | ||
}} | }} |
Revision as of 14:27, 7 April 2019
Description
- Description:
- Applies torque (rotation momentum) to the center of mass of the given object. Torque force is defined as vector [x, y, z] applied in world space. If you need to define torque in model space, convert the torque vector first by vectorModelToWorld or vectorModelToWorldVisual command. The torque applied as impulse. Diagram below explain which way the object would rotate. For more information see NVIDIA docs
- Groups:
- Uncategorised
Syntax
- Syntax:
- object addTorque torque
- Parameters:
- object: Object - PhysX object
- torque: Array - world vector in format [x,y,z]
- Return Value:
- Nothing
Examples
- Example 1:
- Apply torque [1000,0,0] to object not factoring object positioning:
_wheel addTorque [1000,0,0];
- Example 2:
- Apply torque [1000,0,0] relative to object:
_wheel addTorque (_wheel vectorModelToWorld [1000,0,0]);
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