addTorque: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) (locality, description see also format) |
||
Line 1: | Line 1: | ||
{{Command|= | {{Command|= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | |arma3dev |= Game | ||
| | |1.71|= Game Version | ||
|arg= | |arg= global |= Multiplayer Arguments | ||
|eff= | |eff= global |= Multiplayer Effects | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Applies torque to 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. |= Description | | Applies torque (rotation momentum) to the [[getCenterOfMass | 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 momentum. For more information see [http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxRigidBody.html#acb04ffc816d45afff2d04e93d7446e79 NVIDIA docs] |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| object addTorque | | object '''addTorque''' torque |= Syntax | ||
|p1= object: [[Object]] |= Parameter 1 | |p1= object: [[Object]] - PhysX object|= Parameter 1 | ||
|p2= [x, y, z] | |p2= torque: [[Array]] - world vector in format [x,y,z] |= Parameter 2 | ||
|p3= |= Parameter 3 | |p3= |= Parameter 3 | ||
|p4= |= Parameter 4 | |p4= |= Parameter 4 | ||
Line 16: | Line 16: | ||
|p6= |= Parameter 6 | |p6= |= Parameter 6 | ||
| [[Nothing]] |= Return Value | | [[Nothing]] |= Return Value | ||
|x1= Apply torque [ | |x1= Apply torque [1,0,0] to object not factoring object positioning: | ||
<code>_wheel addTorque [ | <code>_wheel [[addTorque]] [1,0,0];</code>|= Example 1 | ||
|x2= Apply torque [ | |x2= Apply torque [1,0,0] relative to object: | ||
<code>_wheel addTorque (_wheel vectorModelToWorld [ | <code>_wheel [[addTorque]] (_wheel [[vectorModelToWorld]] [1,0,0]);</code>|= Example 2 | ||
|[[addForce]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] |= See Also | |[[addForce]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] |= See Also | ||
}} | }} |
Revision as of 22:08, 10 June 2017
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 momentum. 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 [1,0,0] to object not factoring object positioning:
_wheel addTorque [1,0,0];
- Example 2:
- Apply torque [1,0,0] relative to object:
_wheel addTorque (_wheel vectorModelToWorld [1,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
[[Category:Introduced with arma3dev version 1.71]][[ Category: arma3dev: New Scripting Commands | ADDTORQUE]][[ Category: arma3dev: Scripting Commands | ADDTORQUE]]