addTorque: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|") |
||
Line 10: | Line 10: | ||
{{Feature | Informative | A single application of torque would produce one impulse, which may not be enough. In this case consider applying a series of continuous impulses, for example to make a quad bike to roll forward: | {{Feature | Informative | A single application of torque would produce one impulse, which may not be enough. In this case consider applying a series of continuous impulses, for example to make a quad bike to roll forward: | ||
<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. }} | ||
| object '''addTorque''' torque | | object '''addTorque''' torque | ||
|p1= object: [[Object]] - PhysX object | |p1= object: [[Object]] - PhysX object |
Revision as of 02:09, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- Parameters:
- object: Object - PhysX object
- torque: Array - world vector in format [x,y,z]
- Return Value:
- Return value needed
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:
- See also needed
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