Skip to content

Instantly share code, notes, and snippets.

@BaerMitUmlaut
Created May 24, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BaerMitUmlaut/c68143290fe25a75c00789d00fbec91c to your computer and use it in GitHub Desktop.
Save BaerMitUmlaut/c68143290fe25a75c00789d00fbec91c to your computer and use it in GitHub Desktop.
Zero Gravity in Arma
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