Tweak target acquisition. Reset target after shooting

This commit is contained in:
Brandon Danyluk 2021-12-13 15:15:36 -07:00
parent 8da028b626
commit e91b8bc2df
3 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,8 @@ private _intersections = lineIntersectsSurfaces [_origin, _origin vectorAdd (_di
if (_intersections isNotEqualTo []) then {
(_intersections#0) params ["_intersectPos", "", "_object"];
drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,0,0,1], ASLtoAGL _intersectPos, 0.75, 0.75, 0, "", 1, 0.025, "TahomaB"];
if (_designateInput == 1) then {
_seekerTargetPos = _intersectPos;
};

View File

@ -53,7 +53,9 @@ if (cameraView isEqualTo "GUNNER") then {
private _designating = __SPIKE_DISPLAY getVariable [QGVAR(designate), 0];
if (_currentAmmo != 0 && { _designating == 1 || _targetPosition isNotEqualTo [0, 0, 0] }) then {
_targetPosition = [eyePos _currentShooter, getCameraViewDirection _currentShooter, _designating, _targetPosition, _currentShooter] call FUNC(getTargetPosition);
private _viewASL = AGLtoASL positionCameraToWorld [0,0,0];
private _viewDir = _viewASL vectorFromTo (AGLtoASL positionCameraToWorld [0,0,1]);
_targetPosition = [_viewASL, _viewDir, _designating, _targetPosition, _currentShooter] call FUNC(getTargetPosition);
GVAR(arguments) set [1, _targetPosition];
};

View File

@ -68,6 +68,7 @@ if (!(_cameraConfig isEqualTo configNull) && { (getNumber (_cameraConfig >> "ena
};
private _preTarget = +(ACE_PLAYER getVariable [QGVAR(target), [0, 0, 0]]);
ACE_PLAYER setVariable [QGVAR(target), [0, 0, 0]];
private _camera = [_projectile, _cameraArray, _shooter, _preTarget isEqualTo [0, 0, 0]] call FUNC(camera_init);
GVAR(projectileHashMap) set [hashValue _projectile, [_camera, _preTarget]];
[{