addForce
Jump to navigation
Jump to search
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
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