mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Better projected up/down.
This commit is contained in:
parent
1eadcade72
commit
2e9f6a7058
@ -24,16 +24,20 @@ _addHeight = [0,0,0];
|
||||
// Always climb an arc on initial launch if we are close to the round
|
||||
if( ((ASLtoATL _projectilePos) select 2) < 20 && _distanceToShooter < 50) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0,_distanceToTarget];
|
||||
};
|
||||
|
||||
// If we are below the target, increase the climbing arc
|
||||
if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
|
||||
} else {
|
||||
// If we are below the target, increase the climbing arc
|
||||
if((_projectilePos select 2) < (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0, ((_seekerTargetPos select 2) - (_projectilePos select 2))];
|
||||
};
|
||||
};
|
||||
|
||||
// Handle arcing terminal low for high decent
|
||||
if( (_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget < 100) then {
|
||||
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.25];
|
||||
_addHeight = _addHeight vectorDiff [0,0, ((_projectilePos select 2) - (_seekerTargetPos select 2)) * 0.5];
|
||||
} else {
|
||||
if((_projectilePos select 2) > (_seekerTargetPos select 2) && _distanceToTarget > 100) then {
|
||||
_addHeight = _addHeight vectorAdd [0,0, _distanceToTarget*0.02];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,8 +72,9 @@ if(!isNil "_seekerTargetPos") then {
|
||||
if(accTime > 0) then {
|
||||
private["_adjustTime", "_outVector", "_vectorTo"];
|
||||
_adjustTime = 1/accTime;
|
||||
_adjustTime = _adjustTime * (_runtimeDelta / 0.01);
|
||||
TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, (_runtimeDelta / 0.1));
|
||||
_adjustTime = _adjustTime * ( 1 / (_runtimeDelta / 0.1));
|
||||
TRACE_4("Adjust timing", 1/accTime, _adjustTime, _runtimeDelta, ( 1 / (_runtimeDelta / 0.1)) );
|
||||
|
||||
_outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call FUNC(translateToModelSpace);
|
||||
_vectorTo = _projectilePos vectorFromTo _outVector;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user