addForce: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[.*\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
||
Line 28: | Line 28: | ||
};</code> | };</code> | ||
|[[addTorque]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] | |seealso= [[addTorque]], [[vectorModelToWorld]], [[vectorModelToWorldVisual]] | ||
}} | }} | ||
Revision as of 23:21, 16 February 2021
Description
- Description:
- Description needed
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- Parameters:
- object: Object - PhysX object
- [force, position]: Array
- force: Array - force vector (in world space) in format [x,y,z]
- position: Array - model PositionRelative to which force is applied in format [x,y,z]
- Return Value:
- Return value needed
Examples
- Example 1:
- Apply force [0,1000,0] defined in world space (not factoring object actual positioning) to object position [1,0,0]:
_object addForce [[0,1000,0],[1,0,0]];
- Example 2:
- Apply force [0,1000,0] defined in model space (relative to object) to object position [1,0,0]:
_object addForce [_object vectorModelToWorld [0,1000,0],[1,0,0]];
- Example 3:
- Since Arma 3 v2.03.147267, can be used on units:
[] spawn { bob addForce [bob vectorModelToWorld [0,-200,0], bob selectionPosition "rightfoot"]; sleep 5; bob setUnconscious false; };
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