{"name":"switchCamera","operator":null,"title":"switchCamera","type":"command","url":"https://community.bistudio.com/wiki/switchCamera","revid":376544,"updated":"2025-10-27T12:56:35Z","groups":["Camera Control"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Switch camera to given vehicle / camera. Mode is one of:\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","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"target: Object"},{"name":"mode","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"mode: String"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"target","types":["Object"]},"right":{"text":"mode","types":["String"]}},{"syntax":"switchCamera target","since":"arma3 1.66","effect":null,"exec":null,"params":[{"name":"target","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"target: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"target","types":["Object"]}}],"examples":[{"text":"```sqf\nplayer switchCamera \"Gunner\";\n```","code":["player switchCamera \"Gunner\";"]},{"text":"```sqf\nvehicle player switchCamera \"External\";\n```","code":["vehicle player switchCamera \"External\";"]}],"multiplayer":null,"problems":null,"aliases":[],"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```"}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Camera Control","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}