Closed RedFoxIV closed 2 years ago
Please remove the shortcut file as well.
Done
Well spotted, but needs to be fixed for exported SQF as well: https://github.com/zen-mod/ZEN/blob/7b27ef2ba30215edda21a4bbac4515dd0edb4309/addons/common/functions/fnc_exportMissionSQF.sqf#L172
https://github.com/zen-mod/ZEN/blob/36ed48447508f6020a5be609ec8da5b31624b312/addons/common/functions/fnc_serializeObjects.sqf#L200
At this line
worldToModel ASLtoAGL getPosASL
is used to get the offset required for correct attachment of _x. The problem is, the resulting coordinate is not relative to the center of the _object, but it's base. (This may be more complicated if the object is tilted, but it's still not the center.) As a result, _x is displaced vertically.I have tested the following method for every degree of rotation along the global X axis, from 0 to 359. It seems to be a lot more accurate without any special olympics tier of crutches to negate the error in the offset.
Related issue - https://github.com/zen-mod/ZEN/issues/649