unreal.LegacyCameraShake

class unreal.LegacyCameraShake(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: CameraShakeBase

Legacy camera shake which can do either oscillation or run camera anims.

C++ Source:

  • Plugin: GameplayCameras

  • Module: GameplayCameras

  • File: LegacyCameraShake.h

Editor Properties: (see get_editor_property/set_editor_property)

  • anim_blend_in_time (float): [Read-Write] Anim Blend in Time: Linear blend-in time.

  • anim_blend_out_time (float): [Read-Write] Anim Blend Out Time: Linear blend-out time.

  • anim_play_rate (float): [Read-Write] Anim Play Rate: Scalar defining how fast to play the anim.

  • anim_scale (float): [Read-Write] Anim Scale: Scalar defining how “intense” to play the anim.

  • anim_sequence (CameraAnimationSequence): [Read-Write] Anim Sequence: Source camera animation sequence to play. Can be null.

  • fov_oscillation (FOscillator): [Read-Write] FOVOscillation: FOV oscillation

  • loc_oscillation (VOscillator): [Read-Write] Loc Oscillation: Positional oscillation

  • oscillation_blend_in_time (float): [Read-Write] Oscillation Blend in Time: Duration of the blend-in, where the oscillation scales from 0 to 1.

  • oscillation_blend_out_time (float): [Read-Write] Oscillation Blend Out Time: Duration of the blend-out, where the oscillation scales from 1 to 0.

  • oscillation_duration (float): [Read-Write] Oscillation Duration: Duration in seconds of current screen shake. Less than 0 means indefinite, 0 means no oscillation.

  • oscillator_time_remaining (float): [Read-Write] Oscillator Time Remaining: Time remaining for oscillation shakes. Less than 0.f means shake infinitely.

  • random_anim_segment (bool): [Read-Write] Random Anim Segment: If true, play a random snippet of the animation of length Duration. Implies bLoop and bRandomStartTime = true for the AnimSequence. If false, play the full anim once, non-looped. Useful for getting variety out of a single looped AnimSequence asset.

  • random_anim_segment_duration (float): [Read-Write] Random Anim Segment Duration: When bRandomAnimSegment is true, this defines how long the anim should play.

  • root_shake_pattern (CameraShakePattern): [Read-Write] Root Shake Pattern: The root pattern for this camera shake

  • rot_oscillation (ROscillator): [Read-Write] Rot Oscillation: Rotational oscillation

  • shake_scale (float): [Read-Write] Shake Scale: The overall scale to apply to the shake. Only valid when the shake is active.

  • single_instance (bool): [Read-Write] Single Instance: If true to only allow a single instance of this shake class to play at any given time. Subsequent attempts to play this shake will simply restart the timer.

blueprint_update_camera_shake(delta_time, alpha, pov) MinimalViewInfo

Called every tick to let the shake modify the point of view

Parameters:
Returns:

modified_pov (MinimalViewInfo):

Return type:

MinimalViewInfo

property fov_oscillation: FOscillator

[Read-Write] FOVOscillation: FOV oscillation

Type:

(FOscillator)

property loc_oscillation: VOscillator

[Read-Write] Loc Oscillation: Positional oscillation

Type:

(VOscillator)

property oscillator_time_remaining: float

[Read-Only] Oscillator Time Remaining: Time remaining for oscillation shakes. Less than 0.f means shake infinitely.

Type:

(float)

receive_is_finished() bool

Called to allow a shake to decide when it’s finished playing.

Return type:

bool

receive_play_shake(scale) None

Called when the shake starts playing

Parameters:

scale (float) –

receive_stop_shake(immediately) None

Called when the shake is explicitly stopped.

Parameters:

immediately (bool) –

property rot_oscillation: ROscillator

[Read-Write] Rot Oscillation: Rotational oscillation

Type:

(ROscillator)

classmethod start_legacy_camera_shake(player_camera_manager, shake_class, scale=1.000000, play_space=CameraShakePlaySpace.CAMERA_LOCAL, user_play_space_rot=[0.000000, 0.000000, 0.000000]) LegacyCameraShake

Backwards compatible method used by core BP redirectors. This is needed because the return value is specifically a legacy camera shake, which some BP logic often uses directly to set oscillator/anim properties.

Parameters:
Return type:

LegacyCameraShake

classmethod start_legacy_camera_shake_from_source(player_camera_manager, shake_class, source_component, scale=1.000000, play_space=CameraShakePlaySpace.CAMERA_LOCAL, user_play_space_rot=[0.000000, 0.000000, 0.000000]) LegacyCameraShake

Backwards compatible method used by core BP redirectors. This is needed because the return value is specifically a legacy camera shake, which some BP logic often uses directly to set oscillator/anim properties.

Parameters:
Return type:

LegacyCameraShake

classmethod start_matinee_camera_shake(player_camera_manager: PlayerCameraManager, shake_class: Class, scale: float = 1.0, play_space: CameraShakePlaySpace = Ellipsis, user_play_space_rot: Rotator = Ellipsis) LegacyCameraShake

deprecated: ‘start_matinee_camera_shake’ was renamed to ‘start_legacy_camera_shake’.

classmethod start_matinee_camera_shake_from_source(player_camera_manager: PlayerCameraManager, shake_class: Class, source_component: CameraShakeSourceComponent, scale: float = 1.0, play_space: CameraShakePlaySpace = Ellipsis, user_play_space_rot: Rotator = Ellipsis) LegacyCameraShake

deprecated: ‘start_matinee_camera_shake_from_source’ was renamed to ‘start_legacy_camera_shake_from_source’.