Skip to content

Commit

Permalink
Fix attach offsets not being relative to the object's center (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
RedFoxIV authored Feb 25, 2022
1 parent 36ed484 commit 5143dc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_exportMissionSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private _fnc_processAttachedObjects = {
if (isNil "_index") exitWith {};

private _varName = FORMAT_OBJ_VAR(_index);
private _offset = _object worldToModel ASLtoAGL getPosASL _x;
private _offset = _object worldToModel ASLtoAGL getPosWorld _x;
private _dirAndUp = [_object vectorWorldToModel vectorDir _x, _object vectorWorldToModel vectorUp _x];

_outputAttach pushBack ["%1 attachTo [%2, %3];", _varName, _parentVarName, _offset];
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_serializeObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private _fnc_serializeAttachedObjects = {
private _data = _x call _fnc_serializeObject;
if (isNil "_data") exitWith {};

private _offset = _object worldToModel ASLtoAGL getPosASL _x;
private _offset = _object worldToModel ASLToAGL getPosWorld _x;
private _dirAndUp = [_object vectorWorldToModel vectorDir _x, _object vectorWorldToModel vectorUp _x];

_attachedObjects pushBack [_data, _offset, _dirAndUp];
Expand Down

0 comments on commit 5143dc2

Please sign in to comment.