{"name":"switchCamera","title":"switchCamera","type":"command","url":"https://community.bistudio.com/wiki/switchCamera","revid":376544,"updated":"2025-10-27T12:56:35Z","groups":["Camera Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","description":"Switch camera to given vehicle / camera. Mode is one of:\n\n- **\"INTERNAL\"**: 1st person\n- **\"GUNNER\"**: optics / sights\n- **\"EXTERNAL\"**: 3rd person (inaccessible if difficulty settings do not allow for it)\n- **\"GROUP\"**: group\n- **\"CARGO\"**: same as \"INTERNAL\"\n\nIf you switch to a unit in a vehicle, this command uses the correct turret.\n\n> [!IMPORTANT]\n> - Control over the unit is not given to the player. Use selectPlayer or a combination of switchCamera and remoteControl to achieve this.\n> - Always switchCamera first (when needed) **before** using remoteControl as doing it after may lead to unpredictable results.","syntaxes":[{"syntax":"target switchCamera mode","params":[{"name":"target","type":"Object","type_expr":"Object"},{"name":"mode","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"target"},"right":{"text":"mode"}},{"syntax":"switchCamera target","since":"arma3 1.66","params":[{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"target"}}],"examples":[{"code":["player switchCamera \"Gunner\";"]},{"code":["vehicle player switchCamera \"External\";"]}],"see_also":["cameraView","cameraOn","cameraEffect","selectPlayer","remoteControl"],"notes":[{"user":"Killzone_Kid","date":"2015-05-16T13:14:00Z","text":"Force top down view:\n\n```sqf\nprivate _cameraObject = \"Land_HandyCam_F\" createVehicleLocal [0, 0, 0];\n_cameraObject hideObject true;\n_cameraObject attachTo [player, [0, 0, 10]];\n_cameraObject setVectorUp [0, 0.99, 0.01];\n_cameraObject switchCamera \"Internal\";\n\nfindDisplay 46 displayAddEventHandler [\"MouseButtonDown\", {\n    if (_this select 1 == 0) then\n    {\n        player forceWeaponFire [currentMuzzle player, currentWeaponMode player];\n    };\n\n    false;\n}];\n\nfindDisplay 46 displayAddEventHandler [\"KeyDown\", {\n    if (_this select 1 in actionKeys \"ReloadMagazine\") then\n    {\n        reload player;\n    };\n\n    false;\n}];\n```"}]}