{"name":"get3DENCamera","title":"get3DENCamera","type":"command","url":"https://community.bistudio.com/wiki/get3DENCamera","revid":369318,"updated":"2024-09-03T18:42:56Z","groups":["Eden Editor"],"status":"ok","games":{"arma3":"1.56"},"since":"arma3 1.56","arma3_since":"1.56","description":"Returns the camera Object used by the Eden Editor.","syntaxes":[{"syntax":"get3DENCamera","params":[],"returns":{"type":"Object","type_expr":"Object","description":"Eden Editor camera"},"form":"nullary"}],"examples":[{"text":"```sqf\n// set exact yaw, pitch, and roll\n_y = 45; _p = -80; _r = 0;\nget3DENCamera setVectorDirAndUp [\n    [sin _y * cos _p,cos _y * cos _p,sin _p],\n    [[sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D\n];\n```","code":["// set exact yaw, pitch, and roll\n_y = 45; _p = -80; _r = 0;\nget3DENCamera setVectorDirAndUp [\n\t[sin _y * cos _p,cos _y * cos _p,sin _p],\n\t[[sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D\n];"]},{"text":"```sqf\n//Look at player\n_a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player);\n_y = asin(_a select 0);\n_b = [_a,_y] call BIS_fnc_rotateVector2D;\n_z = _b select 2;\n_p = asin(_z / sqrt((_b select 1)^2 + _z^2));\nget3DENCamera setVectorDirAndUp [\n    _a,\n    [[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D\n];\n```","code":["//Look at player\n_a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player);\n_y = asin(_a select 0);\n_b = [_a,_y] call BIS_fnc_rotateVector2D;\n_z = _b select 2;\n_p = asin(_z / sqrt((_b select 1)^2 + _z^2));\nget3DENCamera setVectorDirAndUp [\n\t_a,\n\t[[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D\n];"]}],"see_also":["move3DENCamera","set3DENAttributes"]}