Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getPosASLVisual for icons and camera position #5067

Merged
merged 2 commits into from
Jun 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/spectator/functions/fnc_handleCamera.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if (GVAR(camMode) == 0) then {
_vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)];

// Update the position of the target camera (used for smooth unit tracking)
_target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]);
_target camSetPos ((ASLToAGL getPosASLVisual _unit) vectorAdd [0,0,1.5]);
_target camCommit 0;

// Update the relative position of the unit camera
Expand Down
4 changes: 2 additions & 2 deletions addons/spectator/functions/fnc_handleIcons.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _drawVehicles = [];
_color = GETVAR(_x,GVAR(gColor),[ARR_4(0,0,0,0)]);
_txt = groupID _x;

drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, _leader modelToWorldVisual [0,0,30], 1, 1, 0, _txt, 2, 0.02];
drawIcon3D ["\A3\ui_f\data\map\markers\nato\b_inf.paa", _color, (_leader modelToWorldVisual (_leader selectionPosition "Head")) vectorAdd [0,0,1.5], 1, 1, 0, _txt, 2, 0.02];
} else {
_drawVehicles append (units _x);
};
Expand All @@ -41,6 +41,6 @@ _drawVehicles = [];
_color = GETVAR((group _x),GVAR(gColor),[ARR_4(0,0,0,0)]);
_txt = ["", GETVAR(_x,GVAR(uName),"")] select (isPlayer _x);

drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", _color, _x modelToWorldVisual [0,0,3], 0.7, 0.7, 0, _txt, 1, 0.02];
drawIcon3D ["a3\Ui_f\data\GUI\Rsc\RscDisplayEGSpectator\UnitIcon_ca.paa", _color, (_x modelToWorldVisual (_x selectionPosition "Head")) vectorAdd [0,0,1.5], 0.7, 0.7, 0, _txt, 1, 0.02];
false
} count (_drawVehicles arrayIntersect GVAR(unitList));