Skip to content

VirtualCam2D class reference ‐ CineCam wiki

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

VirtualCam2D

Inherits: Node2DCanvasItemNodeObject

Description

This help document refers to VirtualCam2D class!
Virtual camera for the CineCam2D.
Imagine these nodes as dummy cameras for the CineCam2D.

These dummy cameras will automatically register to the first found CineCam2D.
Be careful! At least one virtual camera has to be above a CineCam2D in the hierarchy!
Otherwise the game will crash!
You can setup blends, a camera priority and an ID to find a virtual camera node.
See CineCam2D for all the things, that you can do with a [VirtualCam2D] node!

They also contain all the properties of a [Camera2D] as dummy values without any use.
Using CineCam2D.apply_vcam2d_data, you can copy the data to your currently runing CineCam2D.

Links

Manual camera blending
Blending by priority
CamSequence for a series of blends
Setup virtual camera data for later use

Inspector

Properties

Type Property Hint
String vcam_id -
int priority default: 0
BlendData2D blend_data -

Methods

Return
String get_vcam_id()
void set_vcam_id(value : String)
int get_priority()
void set_priority(value : int)

Signals

  • signal priority_changed(vcam2d: Object, priority: int)

    Emitted, when the VirtualCam2D.priority has changed

Property Description

  • String vcam_id
    [SET] set_vcam_id(value)
    [GET] get_vcam_id()

    Getter / Setter for the vcam_id property.
    This [String] is just a name, which you can search, using CineCam2D.find_vcam_by_id.
  • int priority
    [SET] set_priority(value)
    [GET] get_priority()

    Getter / Setter for the priority of this virtual camera.
    A CineCam2D will always know the virtual camera with the highest priority.
    See CineCam2D.FollowMode for this.
    The CineCam2D will register the priority, either when:
    ' VirtualCam2D nodes are changed (instanced for example) in the scene tree.
    ' If their priority changes.
    This also happens, when loading the scene!
    If two or more virtual cameras have the same priority, a CineCam2D will register the latest registered as the new "highest priority virtual camera".
  • BlendData2D blend_data
    [SET] _set_blend_data(value)
    [GET] _get_blend_data()

    The default blending data for this virtual camera.
    Will be used, when a CineCam2D blends to this virtual camera.
    If this is empty, CineCam2D.blend_data will be used as a default blend.

Descriptions