Skip to content

Camera

31 tools. Back to the index.

add_camera_component

Destructive.

Add a UCameraComponent to an actor placed in the editor world, found by name or label, optionally attaching it to a SpringArm (or any other USceneComponent) on the same actor; if the actor already has a camera component, that first one is configured instead, whatever its name, overwriting only the fields you pass. One undo step; the level is marked dirty, not saved. An invalid projection_mode or a rejected post_process_settings is an error and nothing is created or written.

Parameter Type Required Description
actor_name string yes Name or label of the target actor.
component_name string no Optional name for a new component (defaults to "Camera"); a name another object of the actor already has gets a unique variant, returned in component_name. Ignored when the actor already has a camera component, which is configured whatever its name.
parent_component string no Optional name of a USceneComponent on the same actor to attach to (e.g. "SpringArm"). Default = actor root component.
field_of_view number no Optional float. Horizontal FOV in degrees (1..170).
aspect_ratio number no Optional float. Aspect ratio (e.g. 16/9). 0 = auto.
ortho_width number no Optional float. Orthographic width (only used when projection_mode = "Orthographic").
projection_mode string no Optional string. "Perspective" or "Orthographic".
location array no Optional [X, Y, Z] relative location vs parent.
rotation array no Optional [Pitch, Yaw, Roll] relative rotation vs parent.
b_use_controller_view_rotation boolean no Optional bool. Match pawn control rotation.
b_use_pawn_control_rotation boolean no Optional bool. Alias for b_use_controller_view_rotation — sets UCameraComponent::bUsePawnControlRotation.
b_lock_to_hmd boolean no Optional bool. Lock orientation to the HMD.
post_process_settings object no Optional object (PostProcess fields, see get_camera_post_process for the schema).
post_process_blend_weight number no Optional float. Weight of post-process (0..1). 0 means post-process disabled.

Returns: { actor_name, component_name, parent_component, already_existed, applied_count, field_of_view, aspect_ratio, projection_mode, location: [x,y,z], rotation: [pitch,yaw,roll], post_process_blend_weight }

add_camera_node_child

Destructive, idempotent.

Populates the Children of a composite rig node (the rig RootNode must be a UArrayCameraNode ("Sequence"); set it via set_camera_rig_root_node node_type=ArrayCameraNode). Creates a new UCameraNode of child_node_type outered to the rig and appends it, in one undo step, then saves the rig. Idempotent via optional index: index<Children.Num() REPLACES that slot instead of appending. added is the read-back of the new child in its slot; a failed save fails the call, with saved false and save_error, and leaves the change in memory. Gameplay Camera System is EXPERIMENTAL (plugin GameplayCameras).

Parameter Type Required Description
camera_rig_path string yes /Game/... path to the UCameraRigAsset whose composite RootNode is edited (required)
child_node_type string yes A concrete UCameraNode subclass name for the new child, e.g. "OffsetCameraNode", "FieldOfViewCameraNode" (required)
index number no Optional child slot. If given and < current child count, REPLACES that slot (deterministic re-runs); otherwise appends.

Returns: { camera_rig_path, child_node_type, child_class, child_index, children_count, added, replaced, saved, save_error }

add_gameplay_camera_component

Additive, idempotent.

Adds a UGameplayCameraComponent to an actor and points it at a UCameraAsset. Idempotent. Note: activation needs a running game/PIE and is out of scope here.

Parameter Type Required Description
actor_name string yes Display label or internal name of the target editor-world actor (required)
camera_asset_path string yes /Game/... path to the UCameraAsset to reference (required)

Returns: { actor_name, component_name, already_existed, camera_asset_path, camera_set }

add_spring_arm

Destructive.

Add a USpringArmComponent (camera boom) to an actor placed in the editor world, found by name or label; if the actor already has a spring arm, that first one is configured instead, whatever its name, overwriting only the fields you pass. A new arm becomes an instance component attached to the root. One undo step; the level is marked dirty, not saved. Negative lengths, sizes and speeds clamp to 0; an unknown probe_channel is an error and nothing is created or written. Attach a camera with add_camera_component (parent_component = the returned component_name); for a Blueprint asset use add_component_to_blueprint.

Parameter Type Required Description
actor_name string yes Name or label of the target actor in the editor world.
component_name string no Optional name for a new component (defaults to "SpringArm"); a name another object of the actor already has gets a unique variant, returned in component_name. Ignored when the actor already has a spring arm, which is configured whatever its name.
target_arm_length number no Optional float. Natural length of the spring arm (uu). Default 300.
socket_offset array no Optional [X, Y, Z] relative offset applied at the spring-arm tip.
target_offset array no Optional [X, Y, Z] world-space offset applied at the start of the spring.
probe_size number no Optional float. Collision probe radius.
probe_channel string no Optional string name of ECollisionChannel (e.g. "Camera", "Visibility"). Default "Camera".
b_do_collision_test boolean no Optional bool. Enable camera collision probe.
b_use_pawn_control_rotation boolean no Optional bool. Use the parent pawn's view rotation.
b_inherit_pitch boolean no Optional bool. Inherit pitch from parent.
b_inherit_yaw boolean no Optional bool. Inherit yaw from parent.
b_inherit_roll boolean no Optional bool. Inherit roll from parent.
b_enable_camera_lag boolean no Optional bool. Enable positional lag.
b_enable_camera_rotation_lag boolean no Optional bool. Enable rotational lag.
camera_lag_speed number no Optional float. Positional lag speed (units/sec).
camera_rotation_lag_speed number no Optional float. Rotational lag speed (deg/sec).

Returns: { actor_name, component_name, already_existed, applied_count, target_arm_length, socket_offset: [x,y,z], target_offset: [x,y,z], probe_size, probe_channel, b_do_collision_test, b_use_pawn_control_rotation, b_inherit_pitch, b_inherit_yaw, b_inherit_roll, b_enable_camera_lag, b_enable_camera_rotation_lag, camera_lag_speed, camera_rotation_lag_speed }

build_camera_rig

Destructive.

Builds a UCameraRigAsset (UCameraRigAsset::BuildCameraRig) and reports the resulting build status.

Parameter Type Required Description
camera_rig_path string yes /Game/... path to the UCameraRigAsset (required)

Returns: { camera_rig_path, built, build_status }

create_camera

Additive.

Spawn a new ACameraActor in the editor world (never in PIE) at an optional location and rotation, with camera_name as its outliner label. Labels need not be unique, so address the camera later by the returned actor_name. Each location axis must be within +-100000, otherwise an error. The level is marked dirty, not saved. location_set, rotation_set and label_set compare what the spawned actor reports with the request. Move or re-aim it with set_camera_transform; spawn_actor places a CameraActor in PIE too; add_camera_component puts a camera on an existing actor.

Parameter Type Required Description
camera_name string yes Name to assign to the new camera actor.
location array no Optional [X, Y, Z] world location for the new camera (defaults to origin)
rotation array no Optional [Pitch, Yaw, Roll] world rotation for the new camera (defaults to zero)

Returns: { camera_name: string, camera_created: bool, actor_name: string, location_set: bool, rotation_set: bool, label_set: bool, actual_label: string, actual_location: [number, number, number] }

create_camera_asset

Additive.

Create a UCameraAsset (Gameplay Camera System, Experimental plugin) at package_path/name and save it; one already there is returned unchanged (already_existed:true), another asset class there is an error. Returns asset_path and saved. Next: set_camera_asset_director, then add_gameplay_camera_component.

Parameter Type Required Description
name string yes Name of the UCameraAsset to create, e.g. "CA_Player"; also the last segment of its path
package_path string no Target content folder (default "/Game/Cameras")

Returns: { name, asset_path, asset_class, already_existed, saved }

create_camera_rig_asset

Additive, idempotent.

Creates a UCameraRigAsset (Gameplay Camera System, Experimental). Idempotent (returns the existing asset).

Parameter Type Required Description
name string yes Asset name (required)
package_path string no Target content folder (default "/Game/Cameras")

Returns: { name, asset_path, asset_class, already_existed, saved }

create_camera_rig_crane

Additive.

Spawn an unrotated CameraRig_Crane actor in the editor world with the given pitch, yaw and arm length; it is always labelled "CameraRigCrane_MCP", so address it later by the returned internal_name. Returns location and the read-back crane values; the level is not saved.

Parameter Type Required Description
location array no Optional [X, Y, Z] world location (defaults to origin; each axis within -100000 to 100000)
crane_pitch number no Crane pitch angle in degrees (optional, default 0)
crane_yaw number no Crane yaw angle in degrees (optional, default 0)
arm_length number no Crane arm length (optional, default 500.0, valid 0-100000)

Returns: { actor_name: string, internal_name: string, location: [number, number, number], crane_pitch: number, crane_yaw: number, arm_length: number, success: bool }

create_camera_rig_rail

Additive.

Spawn an unrotated CameraRig_Rail actor in the editor world; with more than 2 points the rail is rebuilt as a straight 500-unit line along local X. Always labelled "CameraRigRail_MCP", so address it by the returned internal_name, e.g. in set_camera_rig_rail_position. Not saved.

Parameter Type Required Description
location array no Optional [X, Y, Z] world location (defaults to origin; each axis within -100000 to 100000)
num_spline_points number no Number of spline points on the rail (optional, default 2, valid 2-100)

Returns: { actor_name: string, internal_name: string, location: [number, number, number], num_spline_points: number, success: bool }

create_camera_shake_blueprint

Additive, idempotent.

Create a Blueprint asset parented to UCameraShakeBase, compile and save it. UCameraShakeBase is abstract but Blueprintable; the generated Blueprint subclass is concrete. Idempotent: if the asset already exists it is loaded and returned.

Parameter Type Required Description
name string yes Asset name (e.g. BP_ExplosionShake)
package_path string no Target /Game package path (optional, default "/Game/Blueprints")

Returns: { name: string, asset_path: string, parent_class: string, generated_class: string, is_camera_shake: bool, already_existed: bool, created: bool }

get_camera_asset_info

Read-only.

Reports a UCameraAsset's director and, for a SingleCameraDirector, the rig it runs. Read-only.

Parameter Type Required Description
camera_asset_path string yes /Game/... path to the UCameraAsset (required)

Returns: { camera_asset_path, has_director, director_class, camera_rig_path }

get_camera_fov

Read-only.

Retrieve the current field of view (FOV) of a camera.

Parameter Type Required Description
camera_name string yes Name of the camera to query (matches actor name or label).

Returns: { camera_name: string, fov: number }

get_camera_post_process

Read-only.

Read the overridden PostProcessSettings off a camera actor's camera component: only the fields whose bOverride_* companion is on are returned (those actually contributing). Mirrors set_camera_post_process's field set. Pure reader.

Parameter Type Required Description
actor_name string yes Name or label of the camera actor to query.

Returns: { actor_name: string, post_process_blend_weight: number, overridden_count: int, settings: object (overridden field -> value; scalars as numbers, wheels as [R,G,B,master], scene_color_tint as [R,G,B,A]) }

get_camera_rig_nodes

Read-only.

Reports a camera rig's RootNode class and its camera-parameter fields (name + value), plus, for a composite ArrayCameraNode root, its Children (index + class). Read-only.

Parameter Type Required Description
camera_rig_path string yes /Game/... path to the UCameraRigAsset (required)

Returns: { camera_rig_path, has_root_node, root_node_class, parameters:[{name, value}], children:[{index, class}] }

get_camera_transform

Read-only.

Read the world location and rotation of a camera actor (ACameraActor or CineCameraActor) in the editor world, found by object name or label (case-insensitive, first match). Returns location [X, Y, Z] and rotation [Pitch, Yaw, Roll] in degrees; set_camera_transform is the writer.

Parameter Type Required Description
camera_name string yes Name of the camera to query (matches actor name or label).

Returns: { camera_name: string, location: [number, number, number], rotation: [number, number, number] }

get_cameras

Read-only.

List all camera actors in the editor world with their transform and FOV.

Parameter Type Required Description
max_results number no Maximum number of cameras to return (optional, default 1000, valid 1-10000)

Returns: { cameras: [{ name: string, label: string, is_valid: bool, location: [number, number, number], rotation: [number, number, number], fov: number? }], total_count: number, max_results: number, truncated: bool }

get_cine_camera_settings

Read-only.

Read the full cine-camera configuration off a CineCameraActor's CineCameraComponent: filmback (sensor size/offsets/aspect + preset), lens (focal/f-stop range, squeeze, blades, preset), focus (method/manual distance/offset/smoothing) and the current focal length / aperture / focus distance. Pure reader; mutates nothing.

Parameter Type Required Description
actor_name string yes Name or label of the CineCameraActor to query.

Returns: { actor_name: string, filmback: { sensor_width, sensor_height, sensor_horizontal_offset, sensor_vertical_offset, sensor_aspect_ratio, preset_name }, lens: { min_focal_length, max_focal_length, min_fstop, max_fstop, minimum_focus_distance, squeeze_factor, diaphragm_blade_count, preset_name }, focus: { method, manual_focus_distance, focus_offset, smooth_focus_changes, focus_smoothing_interp_speed }, current_focal_length, current_aperture, current_focus_distance, horizontal_fov, vertical_fov, note }

list_camera_node_types

Read-only.

Lists all concrete UCameraNode subclasses usable in a camera rig. Read-only reflection (GetDerivedClasses).

No parameters.

Returns: { base_class, count, types:[{name, path}] }

set_camera_asset_director

Destructive, idempotent.

Wires a new USingleCameraDirector on a UCameraAsset, pointing it at a UCameraRigAsset (the "one rig" director) and replacing any director it had, then saves the asset. One undo step. director_set is the GetCameraDirector read-back; a failed save fails the call, with saved false and save_error, and leaves the change in memory.

Parameter Type Required Description
camera_asset_path string yes /Game/... path to the UCameraAsset (required)
camera_rig_path string yes /Game/... path to the UCameraRigAsset the director runs (required)

Returns: { camera_asset_path, camera_rig_path, director_class, director_set, saved, save_error }

set_camera_fov

Destructive, idempotent.

Set the field of view (degrees, above 0 up to 180) of the camera component of an ACameraActor or CineCameraActor in the editor world, found by object name or label. No undo transaction and nothing is saved. Returns previous_fov, actual_fov and fov_set; get_camera_fov reads it.

Parameter Type Required Description
camera_name string yes Name of the camera to modify (matches actor name or label).
fov number yes Field of view in degrees. Must be between 0.0 and 180.0.

Returns: { camera_name: string, requested_fov: number, previous_fov: number, actual_fov: number, fov_set: bool, camera_valid: bool }

set_camera_node_parameters

Destructive, idempotent.

Sets parameters on a camera rig's RootNode by reflection, in one undo step, then saves the rig. FXxxCameraParameter props take the raw value (written to the nested .Value); other props set directly. Reads the stored values back. A failed save fails the call, with saved false and save_error, and leaves the change in memory.

Parameter Type Required Description
camera_rig_path string yes /Game/... path to the UCameraRigAsset whose RootNode is edited (required)
properties object yes JSON object { PropertyName: value, ... } (e.g. {"FieldOfView": 90})

Returns: { camera_rig_path, node_class, set:[name], failed:[{name, error}], applied:{name: stored_value_text}, saved, save_error }

set_camera_post_process

Destructive, idempotent.

Write PostProcessSettings on a camera actor's camera component (plain or cine) by field presence, turning on each field's bOverride_* companion so it takes effect (like a PostProcess Volume). Supplied fields only; scalars are numbers, color-grading wheels are [R,G,B,master] arrays, scene_color_tint is [R,G,B,A]. Absolute + idempotent. Forces PostProcessBlendWeight>0 and marks the render state dirty.

Parameter Type Required Description
actor_name string yes Name or label of the camera actor to modify.
bloom_intensity string no Optional bloom intensity (number).
bloom_threshold string no Optional bloom threshold (number).
vignette_intensity string no Optional vignette intensity 0..1 (number).
film_grain_intensity string no Optional film grain intensity 0..1 (number).
chromatic_aberration_intensity string no Optional chromatic aberration / scene fringe intensity (number).
chromatic_aberration_start_offset string no Optional chromatic aberration start offset 0..1 (number).
exposure_bias string no Optional auto-exposure bias / EV compensation (number).
exposure_min_brightness string no Optional auto-exposure minimum brightness (number).
exposure_max_brightness string no Optional auto-exposure maximum brightness (number).
exposure_speed_up string no Optional auto-exposure adaptation speed up (number).
exposure_speed_down string no Optional auto-exposure adaptation speed down (number).
ambient_occlusion_intensity string no Optional ambient occlusion intensity 0..1 (number).
ambient_occlusion_radius string no Optional ambient occlusion radius (number).
color_saturation string no Optional color saturation wheel [R,G,B,master] (array).
color_contrast string no Optional color contrast wheel [R,G,B,master] (array).
color_gamma string no Optional color gamma wheel [R,G,B,master] (array).
color_gain string no Optional color gain wheel [R,G,B,master] (array).
color_offset string no Optional color offset wheel [R,G,B,master] (array).
scene_color_tint string no Optional scene color tint [R,G,B,A] (array).
white_temp string no Optional white balance temperature (number).
white_tint string no Optional white balance tint (number).
depth_of_field_fstop string no Optional depth-of-field f-stop (number).
depth_of_field_focal_distance string no Optional depth-of-field focal distance in cm (number).

Returns: { actor_name: string, applied_count: int, applied: object (field -> value read back), post_process_blend_weight: number, success: bool }

set_camera_rig_rail_position

Destructive, idempotent.

Set the camera position along a CameraRig_Rail (0.0 = start, 1.0 = end).

Parameter Type Required Description
rig_actor_name string yes Name or label of the CameraRig_Rail actor.
position number yes Normalised position on the rail, 0.0 to 1.0.

Returns: { rig_actor_name: string, position: number, success: bool }

set_camera_rig_root_node

Destructive, idempotent.

Replace the RootNode of a Gameplay Cameras UCameraRigAsset with a new, default-valued node of node_type; the previous root and everything under it (children, parameter values) is dropped. Runs in an undo transaction and saves the rig; a failed save fails the call, with saved false and save_error, and leaves the change in memory. Does not build the rig (build_camera_rig does). Valid node_type names come from list_camera_node_types; configure the new root with set_camera_node_parameters, give an ArrayCameraNode root children with add_camera_node_child, and read it back with get_camera_rig_nodes.

Parameter Type Required Description
camera_rig_path string yes /Game/... path to the UCameraRigAsset (required)
node_type string yes A concrete UCameraNode subclass name, e.g. "FieldOfViewCameraNode", "OffsetCameraNode", "ArrayCameraNode" (required)

Returns: { camera_rig_path, node_type, node_class, root_set, saved, save_error }

set_camera_transform

Destructive, idempotent.

Update the location and/or rotation of an existing camera.

Parameter Type Required Description
camera_name string yes Name of the camera to modify (matches actor name or label).
location array no Optional new [X, Y, Z] world location; if omitted, location is preserved
rotation array no Optional new [Pitch, Yaw, Roll] world rotation; if omitted, rotation is preserved

Returns: { camera_name: string, transform_set: bool, location_set: bool, rotation_set: bool, actual_location: [number, number, number], actual_rotation: [number, number, number] }

set_cine_camera_aperture

Destructive, idempotent.

Set the aperture (f-stop) on a CineCameraActor for depth-of-field control.

Parameter Type Required Description
camera_actor_name string yes Name or label of the CineCameraActor to modify.
aperture number yes F-stop value. Must be between 0.01 and 512.0.

Returns: { camera_actor_name: string, aperture: number, success: bool }

set_cine_camera_filmback

Destructive, idempotent.

Set the sensor size (filmback, in mm) of the CineCameraComponent on an editor-world actor found by name or label; sensor offsets are reset to 0. No undo transaction, nothing saved. Returns the read-back sensor_width, sensor_height and aspect_ratio; success is false when they do not match.

Parameter Type Required Description
camera_actor_name string yes Name or label of the CineCameraActor to modify.
sensor_width number yes Sensor width in mm. Must be positive and <= 200.
sensor_height number yes Sensor height in mm. Must be positive and <= 200.

Returns: { camera_actor_name: string, sensor_width: number, sensor_height: number, aspect_ratio: number, success: bool }

set_cine_camera_focal_length

Destructive, idempotent.

Set the focal length (mm) on a CineCameraActor's CineCameraComponent.

Parameter Type Required Description
camera_actor_name string yes Name or label of the CineCameraActor to modify.
focal_length number yes Focal length in millimetres. Must be between 0.0 and 1000.0.

Returns: { camera_actor_name: string, focal_length: number, horizontal_fov: number, vertical_fov: number, success: bool }

set_cine_camera_focus

Destructive, idempotent.

Replace the focus settings of the CineCameraComponent on an editor-world actor found by name or label: method, manual focus distance and smoothing; other focus fields, including the tracked actor, reset to defaults. Returns the read-back focus_method and focus_distance; no undo, nothing saved.

Parameter Type Required Description
camera_actor_name string yes Name or label of the CineCameraActor to modify.
focus_method string yes Focus method — one of "Manual", "Tracking", or "Disable".
focus_distance number no Manual focus distance in cm (optional, default 1000.0)
smoothing_speed number no Focus smoothing interpolation speed; 0 disables smoothing (optional, default 4.0)

Returns: { camera_actor_name: string, focus_method: string, focus_distance: number, success: bool }

set_cine_camera_lens

Destructive, idempotent.

Replace the lens limits of the CineCameraComponent on an editor-world actor found by name or label: focal length and f-stop ranges plus blade count; minimum focus distance resets to 0 and squeeze factor to 1. Returns the read-back focal range; no undo, nothing saved.

Parameter Type Required Description
camera_actor_name string yes Name or label of the CineCameraActor to modify.
min_focal_length number yes Minimum focal length in mm. Must be positive.
max_focal_length number yes Maximum focal length in mm. Must be >= min_focal_length.
min_fstop number yes Minimum f-stop. Must be positive.
max_fstop number yes Maximum f-stop. Must be >= min_fstop.
diaphragm_blades number no Number of diaphragm blades for bokeh shape (optional, default 8, valid 4-16)

Returns: { camera_actor_name: string, min_focal_length: number, max_focal_length: number, success: bool }