unreal.CameraModifier

class unreal.CameraModifier(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

A CameraModifier is a base class for objects that may adjust the final camera properties after being computed by the APlayerCameraManager ( see: ModifyCamera). A CameraModifier can be stateful, and is associated uniquely with a specific APlayerCameraManager.

C++ Source:

  • Module: Engine

  • File: CameraModifier.h

Editor Properties: (see get_editor_property/set_editor_property)

  • alpha (float): [Read-Write] Current blend alpha.

  • alpha_in_time (float): [Read-Write] When blending in, alpha proceeds from 0 to 1 over this time

  • alpha_out_time (float): [Read-Write] When blending out, alpha proceeds from 1 to 0 over this time

  • camera_owner (PlayerCameraManager): [Read-Write] Camera this object is associated with.

  • debug (bool): [Read-Write] If true, enables certain debug visualization features.

  • exclusive (bool): [Read-Write] If true, no other modifiers of same priority allowed.

  • priority (uint8): [Read-Write] Priority value that determines the order in which modifiers are applied. 0 = highest priority, 255 = lowest.

property alpha: float

[Read-Only] Current blend alpha.

Type:

(float)

property alpha_in_time: float

[Read-Only] When blending in, alpha proceeds from 0 to 1 over this time

Type:

(float)

property alpha_out_time: float

[Read-Only] When blending out, alpha proceeds from 1 to 0 over this time

Type:

(float)

blueprint_modify_camera(delta_time, view_location, view_rotation, fov) -> (new_view_location=Vector, new_view_rotation=Rotator, new_fov=float)

Called per tick that the modifier is active to allow Blueprinted modifiers to modify the camera’s transform. Scaling by Alpha happens after this in code, so no need to deal with that in the blueprint.

Parameters:
  • delta_time (float) – Change in time since last update

  • view_location (Vector) – The current camera location.

  • view_rotation (Rotator) – The current camera rotation.

  • fov (float) – The current camera fov.

Returns:

new_view_location (Vector): (out) The modified camera location.

new_view_rotation (Rotator): (out) The modified camera rotation.

new_fov (float): (out) The modified camera FOV.

Return type:

tuple

blueprint_modify_post_process(delta_time) -> (post_process_blend_weight=float, post_process_settings=PostProcessSettings)

Called per tick that the modifier is active to allow Blueprinted modifiers to modify the camera’s postprocess effects. Scaling by Alpha happens after this in code, so no need to deal with that in the blueprint.

Parameters:

delta_time (float) – Change in time since last update

Returns:

post_process_blend_weight (float): (out) Blend weight applied to the entire postprocess structure.

post_process_settings (PostProcessSettings): (out) Post process structure defining what settings and values to override.

Return type:

tuple

property camera_owner: PlayerCameraManager

[Read-Only] Camera this object is associated with.

Type:

(PlayerCameraManager)

disable_modifier(immediate=False) None

Disables this modifier.

Parameters:

immediate (bool) – true to disable with no blend out, false (default) to allow blend out

enable_modifier() None

Enables this modifier.

property exclusive: bool

[Read-Only] If true, no other modifiers of same priority allowed.

Type:

(bool)

get_view_target() Actor
Returns:

Returns the actor the camera is currently viewing.

Return type:

Actor

is_disabled() bool
Returns:

Returns true if modifier is disabled, false otherwise.

Return type:

bool

property priority: int

[Read-Only] Priority value that determines the order in which modifiers are applied. 0 = highest priority, 255 = lowest.

Type:

(uint8)