setCameraAttributes should use ATL

This commit is contained in:
SilentSpike 2015-07-21 18:07:55 +01:00
parent e81f9f5e59
commit 7234c928bc
3 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ GVAR(availableVisions) = [-2,-1,0,1];
GVAR(camMode) = 0; GVAR(camMode) = 0;
GVAR(camPan) = 0; GVAR(camPan) = 0;
GVAR(camPos) = [worldSize * 0.5,worldSize * 0.5,20]; GVAR(camPos) = ATLtoASL [worldSize * 0.5, worldSize * 0.5, 20];
GVAR(camSpeed) = 1; GVAR(camSpeed) = 1;
GVAR(camTilt) = -10; GVAR(camTilt) = -10;
GVAR(camUnit) = objNull; GVAR(camUnit) = objNull;

View File

@ -36,7 +36,7 @@ switch (toLower _mode) do {
GVAR(mousePos) = [0.5,0.5]; GVAR(mousePos) = [0.5,0.5];
// Initalize the camera view // Initalize the camera view
GVAR(camera) = "Camera" camCreate GVAR(camPos); GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos));
[] call FUNC(transitionCamera); [] call FUNC(transitionCamera);
// Create the dialog // Create the dialog
@ -321,7 +321,7 @@ switch (toLower _mode) do {
if (GVAR(camMode == 0) && (_button == 0) && _ctrl) then { if (GVAR(camMode == 0) && (_button == 0) && _ctrl) then {
_newPos = _map ctrlMapScreenToWorld [_x,_y]; _newPos = _map ctrlMapScreenToWorld [_x,_y];
_oldZ = (ASLtoATL GVAR(camPos)) select 2; _oldZ = (ASLtoATL GVAR(camPos)) select 2;
_newPos set [2, _oldZ] _newPos set [2, _oldZ];
GVAR(camPos) = (ATLtoASL _newPos); GVAR(camPos) = (ATLtoASL _newPos);
}; };
}; };

View File

@ -13,7 +13,7 @@
* - -1: Night vision * - -1: Night vision
* - 0: Thermal white hot * - 0: Thermal white hot
* - 1: Thermal black hot * - 1: Thermal black hot
* 3: Camera position (ASL) <ARRAY> <OPTIONAL> * 3: Camera position (ATL) <ARRAY> <OPTIONAL>
* 4: Camera pan (0 - 360) <NUMBER> <OPTIONAL> * 4: Camera pan (0 - 360) <NUMBER> <OPTIONAL>
* 5: Camera tilt (-90 - 90) <NUMBER> <OPTIONAL> * 5: Camera tilt (-90 - 90) <NUMBER> <OPTIONAL>
* 6: Camera zoom (0.1 - 2) <NUMBER> <OPTIONAL> * 6: Camera zoom (0.1 - 2) <NUMBER> <OPTIONAL>
@ -51,7 +51,7 @@ if !(_vision in GVAR(availableVisions)) then {
}; };
GVAR(camPan) = ((_heading % 360) max 0); GVAR(camPan) = ((_heading % 360) max 0);
GVAR(camPosition) = _position; GVAR(camPosition) = (ATLtoASL _position);
GVAR(camSpeed) = _speed; GVAR(camSpeed) = _speed;
GVAR(camTilt) = ((_heading min -90) max 90); GVAR(camTilt) = ((_heading min -90) max 90);
GVAR(camUnit) = _unit; GVAR(camUnit) = _unit;