Skip to content

VirtualCam2D class reference ‐ CineCam wiki

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

VirtualCam2D

Inherits: Node2D < CanvasItem < Node < Object

Description

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

These dummy cameras will automatically register to the first found [H_CineCam2D].
Be careful! At least one virtual camera has to be above a [H_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 [H_CineCam2D] for all the things, that you can do with a [H_VirtualCam2D] node!

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

Links

Link1
Link2
Link3

Properties

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

Methods

Return Method
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 [member H_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 [method H_CineCam2D.find_vcam_by_id].
  • int=0 priority
    [SET] set_priority(value)
    [GET] get_priority()

    Getter / Setter for the priority of this virtual camera.
    A [H_CineCam2D] will always know the virtual camera with the highest priority.
    See [enum H_CineCam2D.FollowMode] for this.
    The [H_CineCam2D] will register the priority, either when: \
  • [H_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 [H_CineCam2D] will register the latest registered as the new "highest priority virtual camera".
  • H_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 [H_CineCam2D] blends to this virtual camera.
    If this is empty, [member H_CineCam2D.blend_data] will be used as a default blend.

Method Descriptions