make over-fly trajectory over-fly

This commit is contained in:
Brandon Danyluk 2021-08-02 16:51:46 -06:00
parent 7b7d79fbd3
commit 76c5c6e6d3
2 changed files with 13 additions and 1 deletions

View File

@ -19,7 +19,7 @@ params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_statePa
_firedEH params ["_shooter","","","","","","_projectile"]; _firedEH params ["_shooter","","","","","","_projectile"];
_launchParams params ["","_targetLaunchParams","","_attackProfile"]; _launchParams params ["","_targetLaunchParams","","_attackProfile"];
_targetLaunchParams params ["_target"]; _targetLaunchParams params ["_target"];
_stateParams params ["", "", "_attackProfileStateParams"]; _stateParams params ["", "_seekerStateParams", "_attackProfileStateParams"];
// Reset _launchPos origin as projectile's height instead of player's foot // Reset _launchPos origin as projectile's height instead of player's foot
_targetLaunchParams set [2, getPosASL _projectile]; _targetLaunchParams set [2, getPosASL _projectile];
@ -55,6 +55,10 @@ if (_shooter == ACE_player) then {
_yawChange = -10 max _yawChange min 10; _yawChange = -10 max _yawChange min 10;
_pitchChange = -10 max _pitchChange min 10; _pitchChange = -10 max _pitchChange min 10;
_seekerStateParams set [2, _yawChange];
_seekerStateParams set [3, _pitchChange];
_seekerStateParams set [4, CBA_missionTime]
TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange); TRACE_3("attackProfileStateParams",_firedLOS,_yawChange,_pitchChange);
_attackProfileStateParams set [0, CBA_missionTime]; _attackProfileStateParams set [0, CBA_missionTime];
_attackProfileStateParams set [1, _firedLOS]; _attackProfileStateParams set [1, _firedLOS];

View File

@ -22,9 +22,17 @@ _args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"];
_firedEH params ["","","","","","","_projectile"]; _firedEH params ["","","","","","","_projectile"];
_launchParams params ["", "_targetLaunchParams", "", "_attackProfile"]; _launchParams params ["", "_targetLaunchParams", "", "_attackProfile"];
_targetLaunchParams params ["", "", "_launchPos"]; _targetLaunchParams params ["", "", "_launchPos"];
_stateParams params ["", "", "", "", "_navigationParams"];
if (_attackProfile == QGVAR(directAttack)) exitWith {[0,0,0]}; if (_attackProfile == QGVAR(directAttack)) exitWith {[0,0,0]};
_seekerStateParams params ["", "", "", "_originalPitchRate", "_startTime"];
_navigationParams params ["", "_pitchRate"];
// pitch up for the first second of flight to begin an over-fly trajectory
private _pitchChange = linearConversion [0, 1, CBA_missionTime - _startTime, 1, 0, true];
_navigationParams set [1, _originalPitchRate + _pitchChange];
private _projPos = getPosASL _projectile; private _projPos = getPosASL _projectile;
// Arm seeker after 20 meters // Arm seeker after 20 meters