ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Laserdesignator does not stay locked to area on CUP A-10 with ACE

Open TheLukio opened this issue 9 months ago • 3 comments

Mods (complete and add to the following information):

  • Arma 3: Game version: 2.18.152405 Branch: profiling
  • CBA: v 3.18.1.241014`
  • ACE3: v 3.19.0.96`
  • CUP Vehicles/Units/Weapons 1.18.1

Description: When flying the CUP A-10A, and locking the TGP to an area, the viewpoint/reticule will start moving as soon as the laser designator is activated. This occurs only over landmass. Over water the viewpoint with activated laser designator behaves normally.

Steps to reproduce:

  1. Open editor, place CUP A-10 A into map whilst having only CBA3, CUP and ACE loaded.
  2. Place A-10A (CUP_B_A10_DYN_USA) on map, set height of plane to 1000m to start flying, start mission (Preview / MP )
  3. Activate targeting camera of A-10
  4. Lock camera view to an area over landmass
  5. Note camera target stays locked on area
  6. Switch to laser designator weapon
  7. Turn on laser designator.
  8. Note previously area locked target starts moving
  9. Unlock target and move over water
  10. Lock target reticule to area over water while laser designator is still active
  11. Note that target area remains locked and does not move, unlike on land.

Normally the locked view of a target pod remains (within some constraints of the aircraft) to the targetetted area, regardless if the laser designator is turned on or off. However with ACE enabled, the target area wanders off and only will stay on point of water.

Where did the issue occur?

  • This issue occurred single player/editor/self-hosted only with CUP A-10A (class name: "CUP_B_A10_DYN_USA"). This issue does not occur with the A-164 Wipeout (Vanilla Arma) / A-10D (Ace renamed)

Log Files:

  • No log attached, as there is no specific error message, the log shows no irregularities.

Additional context:

  • There is no error message, glitch or anything. The previously target reticule will just start moving as soon as the laser designator is active over a landmass. I've asked in CUP Disocrd and they said it's related to ACE.

Screenshots: Youtube Video demonstrating issue on Stratis: https://youtu.be/f_E_ywE7npQ

TheLukio avatar Mar 01 '25 21:03 TheLukio

Just commenting as the person who implemented the following, I'm almost certain it has to do with the 'laser point track' (https://github.com/acemod/ACE3/blob/master/addons/laser/functions/fnc_laserPointTrack.sqf) function. The original purpose of the laser point track was to allow it to 'grab' a location on an object or building, rather than the terrain behind it. Trying to constantly set the pilot target at strange angles may result in the targeting pod 'walking' as it tries to follow the laser.

Recommend replacing lines 27-38 with the following (or something similar):

    if (isNull _targetObj) then {
        private _laserTargetPos = getPosASL (laserTarget _vehicle);
        private _pilotCameraPos = _vehicle modelToWorldVisualWorld (getPilotCameraPosition _vehicle);
        private _pilotCameraVector = _pilotCameraPos vectorFromTo _laserTargetPos;
        private _laserDistance = _pilotCameraPos distance _laserTargetPos;
        private _spotDistance = _spotPos distance _laserTargetPos;
        if (_spotDistance > 3.5) then {
            private _vehPos = getPosASL _vehicle;
            private _vectorToLaser = _pilotCameraPos vectorFromTo _laserTargetPos;
            private _vectorToSpot = _pilotCameraPos vectorFromTo _spotPos;
            if (acos (_vectorToLaser vectorCos _vectorToSpot) < 0.015) then {
                _vehicle setPilotCameraTarget _laserTargetPos;
                hint format ["%1\n%2\n%3\n%4", _pilotCameraPos, _laserTargetPos, _spotDistance, _laserDistance];
            };
        };
    };

~~Since this should use an identical vector to what's already being generated by the camera (instead of slaving to some point within a particular angle), and only changing the distance to the 'locked' terrain point, this code change should reduce, if not completely eliminate, any laser walking as the camera being slaved to a point should no longer introduce angular change.~~

This can use the same logic, and also increase the tolerances a bit, as well as recalculates all angular differences from the targeting pod instead of the vehicle center, reducing any parallax error that might cause laser spot walk.

LorenLuke avatar Mar 03 '25 01:03 LorenLuke

Same happens in the Hatchet H60. FLIR Pod is stable until you enable the laser desigantor. The Pod will start "drifting" or rather chase the laser, depending of the angle of the surface. A fix would be great!

Gruman88 avatar Apr 30 '25 09:04 Gruman88

Honestly, a CBA Addon Options setting to disable this built-in LST functionality would probably be a good idea, as Gruman88 above me said, it causes some issues in conjunction with the Hatchet H-60.

Kill3rCat avatar May 13 '25 10:05 Kill3rCat

Can reproduce reliably with the Vanilla A-10. Happens whenever one is in Area track and self-designating a point far off towards the sides of the aircraft. It's definitely caused by: https://github.com/acemod/ACE3/blob/d0df7f08e96e25dc6131181fa348f1dcc6569aa2/addons/laser/functions/fnc_laserPointTrack.sqf#L34-L36 Which was introduced by #8453, to:

Automatically point lock one's own laser designator dot while it's on, allowing your vehicle to track buildings and such, rather than the terrain behind them.

mrschick avatar Jul 14 '25 10:07 mrschick

@LorenLuke Nice! That one works like a charm!

mrschick avatar Jul 15 '25 10:07 mrschick