addForce

From Bohemia Interactive Community
Revision as of 13:55, 2 June 2017 by Warka (talk | contribs) (Created page with "{{Command|= ____________________________________________________________________________________________ |arma3 |= Game |dev|= Game Version |arg= |= Multiplayer Arguments |ef...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Applies force to given object at given position. Force is defined as vector [x, y, z] in world space, position is vector [x, y, z] in model space. If you need to define force in model space, use vectorModelToWorld or vectorModelToWorldVisual commands first.
Groups:
Uncategorised

Syntax

Syntax:
object addForce [[x, y, z],[x, y, z]]
Parameters:
object: Object
[[x1, y1, z1],[x2, y2, z2]]: Array
[x1, y1, z1]: Array - force (in world space)
[x2, y2, z2]: Array - position (in model space)
Return Value:
Nothing

Examples

Example 1:
Apply force [0,10000,0] defined in world space (not factoring object actual positioning) to object position [1,0,0]: _object addForce [[0,10000,0],[1,0,0]];
Example 2:
Apply force [0,10000,0] defined in model space (relative to object) to object position [1,0,0]: _object addForce [_object vectorModelToWorld [0,10000,0],[1,0,0]];

Additional Information

See also:
addTorquevectorModelToWorldvectorModelToWorldVisual

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

Bottom Section