getFCSAimPoint
Description: Returns the position (in relative model coordinates ASL; coords with Target as objNull are given as if weaponDirection is [0, 1, 0] ) of the projected aimpoint for the given FCS of the current weapon. Returns are calculated based on the following cases of the weapon's ballisticsComputer config entry in WeaponsConfig:
- ballisticsComputer = 0; // Aimpoint returned is aimPos of the particular target; objNull as Target returns [0, 0, 0];
- ballisticsComputer = 1; // Aimpoint returned is of predicted impact point, were sights properly aligned; objNull as Target returns [0, 0, 0];
- ballisticsComputer = 2; // Aimpoint returned is aimPos of the particular target, plus the added height of the zeroing to compensate projectile drop; objNull as Target returns height difference of bullet drop at zeroed distance versus straight line distance; [0, zeroingDistance, bulletDropHeight];
- ballisticsComputer = 4; // Aimpoint returned is predicted intercept point that's needed to be aimed at; objNull as Target returns [0, 0, 0];
- ballisticsComputer = 8; // Aimpoint returned is the bomb CCIP impact point; as displayed/calculated on a plane's HUD; objNull as Target returns the bomb CCIP impact point;
- ballisticsComputer = 16; // Aimpoint returned is of predicted impact point, were sights properly aligned; objNull returns stored impact point based on laser and range, [metersLeftRightOfWeaponToImpact, metersForwardToImpact, metersUpDownToImpact];
Syntax 1: Unit getFCSAimPoint Target; <OBJECT>, <OBJECT>; Syntax 1 uses currentWeapon of the Unit;
Syntax 2: Unit getFCSAimPoint [Target , WeaponName]; <OBJECT>, <OBJECT>, <STRING>; Syntax 2 uses listed weapon on the chassis; If Unit doesn't have the weapon of WeaponName, returns [0, 0, 0];
Return: ImpactPointASL ; <ARRAY>; Position ASL in model reference space;
Return: ImpactPointASL ; <ARRAY of ARRAYS>; for each ballisticsComputer type, e.g. ballisticsComputer = 4 + 2;
ARRAY = [ Number Type of FCS , Position ASL in model reference space of returned point];
Reasoning:
The command getFCSAimPoint provides script-makers with the capability of using the same engine-level predicted points of impact. This can facilitate the usage of lockCameraTo for automatic target tracking, access to CCIP computations for dropped bombs (or even setup for a script based Constantly Calculated Release Point and automatic release) in a quick engine-level command, rather than having to rely on inefficient stepwise SQF or extension-based scripts to calculate these impact points.