Created
May 24, 2019 08:30
-
-
Save BaerMitUmlaut/c68143290fe25a75c00789d00fbec91c to your computer and use it in GitHub Desktop.
Zero Gravity in Arma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private _vehicle = "B_MBT_01_cannon_F" createVehicle [0, 0, 0]; | |
_vehicle setPosASL ((getPosASL player) vectorAdd [0, 10, 3]); | |
[{ | |
params ["_args"]; | |
_args params ["_vehicle", "_lastRun"]; | |
private _delta = cba_missionTime - _lastRun; | |
private _force = [0, 0, getMass _vehicle * _delta * 9.8]; | |
_vehicle addForce [_force, getCenterOfMass _vehicle]; | |
_args set [1, cba_missionTime]; | |
}, 0, [_vehicle, cba_missionTime]] call CBA_fnc_addPerFrameHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment