Skip to content

CineCam2D class reference ‐ CineCam wiki

Lukas Schmidt edited this page May 28, 2024 · 25 revisions

CineCam2D

Inherits: Camera2DNode2DCanvasItemNodeObject

Description

This help document refers to CineCam2D class!
Main Camera for the CineCam2D.
Features include camera shaking, camera blending to VirtualCam2D, targeting CamTarget2D and more.

Links

Camera shaking

Inspector

Properties

Type Property Hint
BlendData2D blend_data -
bool blend_pause default: false
CamSequence2D current_sequence -
FollowMode follow_mode default: 0
bool follow_prio_pause default: false
bool follow_target_pause default: false
bool sequence_pause default: false
float shake_offset_duration default: 0.0
Vector2 shake_offset_intensity default: Vector2(0, 0)
float shake_rotation_duration default: 0.0
float shake_rotation_intensity default: 0.0
float shake_zoom_duration default: 0.0
Vector2 shake_zoom_intensity default: Vector2(0, 0)
CamTarget2D target -

Methods

Return Method
String apply_vcam2D_data(vcam2D: VirtualCam2D)
void blend_to(vcam2D : VirtualCam2D, blend_data : BlendData2D)
VirtualCam2D find_vcam_by_id(id : String)
float full_blend_duration()
void init_default_blend_data()
void pause_blend()
void pause_follow_prio()
void pause_follow_target()
void prioritized_vcam()
void reposition_to_vcam(vcam : VirtualCam2D)
void resume_blend()
void resume_follow_prio()
void resume_follow_target()
void seq_blend_next()
void seq_blend_prev()
void seq_blend_to(idx: int)
void seq_pause()
void seq_resume()
void seq_stop()
void shake_offset(intensity : Vector2, duration : float, ease : Tween.EaseType, trans : Tween.TransitionType)
void shake_rotation(intensity : float, duration : float, ease : Tween.EaseType, trans : Tween.TransitionType)
void shake_zoom(intensity : Vector2, duration : float, ease : Tween.EaseType, trans : Tween.TransitionType)
void start_sequence(backwards : bool = false)
void start_sequence_at(backwards : bool = false, index : int = 0)
void toggle_follow_prio()
void toggle_follow_target()
CamSequence2D get_current_sequence()
void set_current_sequence(value : CamSequence2D)
FollowMode get_follow_mode()
void set_follow_mode(value : FollowMode)
bool is_follow_prio_paused()
void set_follow_prio_paused(value : bool)
bool is_follow_target_paused()
void set_follow_target_paused(value : bool)
CamTarget2D get_target()
void set_target(value : CamTarget2D)

Signals

  • signal sequence_completed()

    Emitted when a sequence of blends, using CamSequence2D was completed.
  • signal shake_offset_ended()

    Emitted when the camera shake, using its offset, has ended.
    See CineCam2D.shake_offset
  • signal shake_offset_started()

    Emitted when the camera shake, using its offset, is started.
    See CineCam2D.shake_offset
  • signal shake_rotation_ended()

    Emitted when the camera shake, using its rotation, has ended.
    See CineCam2D.shake_rotation
  • signal shake_rotation_started()

    Emitted when the camera shake, using its rotation, has started.
    See CineCam2D.shake_rotation
  • signal shake_zoom_ended()

    Emitted when the camera shake, using its zoom, has ended.
    See CineCam2D.shake_zoom
  • signal shake_zoom_started()

    Emitted when the camera shake, using its zoom, has started.
    See CineCam2D.shake_zoom

Enumerations

Property Description

  • bool blend_pause
    [SET] _set_blend_paused(value)
    [GET] _is_blend_paused()

    Getter / Setter for pausing the tween that is used for camera blends.
    See CineCam2D.pause_blend.
  • bool follow_prio_pause
    [SET] set_follow_prio_paused(value)
    [GET] is_follow_prio_paused()
  • float shake_offset_duration
    [SET] _set_shake_offset_duration(value)
    [GET] _get_shake_offset_duration()

    Getter / Setter for the shake offset duration.
    Can be increased during a shake to increase its duration.
  • Vector2 shake_offset_intensity
    [SET] _set_shake_offset_intensity(value)
    [GET] _get_shake_offset_intensity()

    Getter / Setter for the shake offset intensity.
    Can be increased during a shake to increase its intensity.
  • float shake_rotation_duration
    [SET] _set_shake_rotation_duration(value)
    [GET] _get_shake_rotation_duration()

    Getter / Setter for the shake rotation duration.
    Can be increased during a shake to increase its duration.
  • float shake_rotation_intensity
    [SET] _set_shake_rotation_intensity(value)
    [GET] _get_shake_rotation_intensity()

    Getter / Setter for the shake rotation intensity.
    Can be increased during a shake to increase its intensity.
  • float shake_zoom_duration
    [SET] _set_shake_zoom_duration(value)
    [GET] _get_shake_zoom_duration()

    Getter / Setter for the shake zoom duration.
    Can be increased during a shake to increase its duration.
  • Vector2 shake_zoom_intensity
    [SET] _set_shake_zoom_intensity(value)
    [GET] _get_shake_zoom_intensity()

    Getter / Setter for the shake zoom intensity.
    Can be increased during a shake to increase its intensity.

Descriptions

  • void seq_pause()

    Pauses the current running sequence. Will not pause the blend, just the execution of the sequence.
  • void seq_resume()

    Resumes the current running sequence, regardless of the current state.