Difference between revisions of "cameraEffect"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Text replacement - "|= Game version" to "|Game version=")
Line 4: Line 4:
| ofp |Game name=
| ofp |Game name=
|1.00|= Game version
|1.00|Game version=
|arg= local |Multiplayer Arguments=
|arg= local |Multiplayer Arguments=

Revision as of 04:55, 31 August 2019

Introduced with Operation Flashpoint version 1.001.00Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on
Hover & click on the images for descriptions


Sets the given effect on the given camera. If you want to switch the screen directly to the first-person, aiming, third-person or group view of an object, use switchCamera instead. The effect type "Terminate" is used to exit the current camera view and switch back to the player's view. Does not need camCommit.

Since Arma 3 v1.73.142217, it is possible to terminate individual r2t source. For example: cam cameraEffect ["terminate", "back", "rtt1"]; // would terminate "rtt1" r2t source cam cameraEffect ["terminate", "back"]; // would terminate all r2t sources
One cannot mix and match cameraEffect and can either have multiple r2t cameras or a single camera for the whole screen. If one needs a background stream overlayed with r2t streams, this could be achieved by creating an object and using switchCamera to switch to it for background image, while using cameraEffect for r2t overlay (see Example 4)


camera cameraEffect [effectName, effectPosition, r2tName]
camera: Object - object of type "camera"
[effectName, effectPosition, r2tName]: Array
effectName: String - the effect type (defined in main config or CfgCameraEffects >> Array). Defaults are: "Internal", "External", "Fixed", "FixedWithZoom", "Terminate"
effectPosition: String - position of the effect. One of: "TOP", "LEFT", "RIGHT", "FRONT", "BACK", "LEFT FRONT", "RIGHT FRONT", "LEFT BACK", "RIGHT BACK", "LEFT TOP", "RIGHT TOP", "FRONT TOP", "BACK TOP", "BOTTOM". These are usually used with "Fixed" and "FixedWithZoom" effect types. If not sure which position to use, set it to "BACK";
r2tName (Optional): String - Render To Texture surface reference
Return Value:


Example 1:
_cam cameraEffect ["internal", "BACK"];
Example 2:
_cam cameraEffect ["internal", "back", "rendersurface"];
Example 3:
cam = "seagull" camCreate (player modelToWorld [0,0,100]); cam cameraEffect ["FIXED", "LEFT TOP"]; cam camCommand "MANUAL ON";
Example 4:
_ctrl = findDisplay 46 createDisplay "RscDisplayEmpty" ctrlCreate ["RscPicture", -1]; _ctrl ctrlSetPosition [0.5, 0, 0.5, 0.5]; _ctrl ctrlSetText "#(argb,512,512,1)r2t(rtt1,1.0)"; _ctrl ctrlCommit 0; _cam1 = "camera" camCreate (ASLtoAGL eyePos player vectorAdd [0, -10, 0]); _cam1 cameraEffect ["Internal", "Back", "rtt1"]; _cam2 = "Land_HandyCam_F" createVehicle [0,0,0]; _cam2 enableSimulation false; _cam2 setPos (ASLtoAGL eyePos player vectorAdd [0, 10, 0]); _cam2 setDir (_cam2 getDir player); switchCamera _cam2;

Additional Information

See also:


Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.


Bottom Section

Posted on October 30, 2016 - 16:40 (UTC)
Killzone Kid
Types of camera for CfgCameraEffects config:
  • CamExternal (CamInterpolated) type = 0; // linked directly with object
  • CamStatic type = 1; // fixed point in space
  • CamStaticWithZoom type = 2; // fixed point in space
  • CamChained type = 3; // chained
  • CamTerminate type = 4; // terminate
  • CamInternal type = 5; // internal view