addTorque: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| ?\[\[([a-zA-Z0-9]+)\]\] *\|x1=" to " |r1= $1 |x1=")
m (Text replacement - " \| *(([^=\| ]+)('''|\[\[)([^=\| ]+)) * +\|p1=" to " |s1= $1 |p1=")
Line 11: Line 11:
<code>[[onEachFrame]] { quad [[addTorque]] (quad [[vectorModelToWorld]] [100,0,0]) }</code>}}
<code>[[onEachFrame]] { quad [[addTorque]] (quad [[vectorModelToWorld]] [100,0,0]) }</code>}}
{{Feature | important |This command doesn't follow convention for torque direction, which obeys right-hand rule. To comply, negate all values in the vector. }}
{{Feature | important |This command doesn't follow convention for torque direction, which obeys right-hand rule. To comply, negate all values in the vector. }}
| object '''addTorque''' torque
|s1=  object '''addTorque''' torque
 
|p1= object: [[Object]] - PhysX object
|p1= object: [[Object]] - PhysX object
|p2= torque: [[Array]] - world vector in format [x,y,z]
|p2= torque: [[Array]] - world vector in format [x,y,z]

Revision as of 00:13, 13 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Object Manipulation

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

See also:
addForcevectorModelToWorldvectorModelToWorldVisual

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