Skip to content

TweenDirectorResource

Inherits: Resource

Applied to PhantomCameraTweenDirector, TweenDirectorResource allows for overriding the PhantomCameraTween applied to PCams based on a list of To and From targets.

The targets are defined by either individually selected PCams in the current scene, or by the PhantomCameraTween resource applied to them.

Properties

tween_resource

Type: PhantomCameraTween

Default: null

The PhantomCameraTween that should be used if a PCam member of the from_type and to_type lists match when a tween occurs.


Setter

void set_tween_resource(PhantomCameraTween value)

Example
gdscript
pcam_tween_director.set_tween_resource(tween_resource)

Getter

int get_tween_resource()

Example
gdscript
pcam_tween_director.get_tween_resource()

from_type

Type: int

Default: 0

The type identifier for the From, or currently active, PCam that should make the tween_resource override the tween defined in the To section.

TYPEValueDescription
PHANTOM_CAMERA0Target individual PCams from the current current scene.
TWEEN_RESOURCE1Target PCams based on the PhantomCameraTween resource applied to them. The resources must be saved on the filesystem and applied to PCams in order to be referenced.
ANY2Target all PCams in the scene.
Be mindful when using this.

Setter

void set_from_type(int value)

Example
gdscript
# Apply using enum
pcam_tween_director.set_from_type(TweenDirectorResource.TYPE.TWEEN_RESOURCE)

# Apply using int
pcam_tween_director.set_from_type(1)

Getter

int get_from_type()

Example
gdscript
pcam_tween_director.get_from_type()

from_phantom_cameras

Type: Array[NodePath]

Default: []

The list of PCams that should trigger the tween_resource override when tweened From.


Setter

void set_from_phantom_cameras(Array[NodePath] value)

Example
gdscript
pcam_tween_director.set_from_phantom_cameras()

Getter

Array[NodePath] get_from_phantom_cameras()

Example
gdscript
pcam_tween_director.get_from_phantom_cameras()

from_tween_resources

Type: Array[PhantomCameraTween]

Default: []

The list of PCams with the [PhantomCameraTween] resources applied to them that should trigger the tween_resource override when tweened From.

Important

The tween resources on the list must be saved on the filestyle.


Setter

void set_from_tween_resources(Array[PhantomCameraTween] value)

Example
gdscript
pcam_tween_director.set_from_tween_resources(phantom_camera_tween_resources)

Getter

Array[PhantomCameraTween] get_from_tween_resources()

Example
gdscript
pcam_tween_director.get_from_tween_resources()

to_type

Type: int

Default: 0

The type identifier for the To, or about-to-become-active, PhantomCamera that should make the tween-resource override the tween defined in the To section.

TYPEValueDescription
PHANTOM_CAMERA0Target individual PCams from the current current scene.
TWEEN_RESOURCE1Target PCams based on the PhantomCameraTween resource applied to them. The resources must be saved on the filesystem and applied to PCams in order to be referenced.
ANY2Target all PCams in the scene.
Be mindful when using this.

Setter

void set_to_type(int value)

Example
gdscript
# Apply using enum
pcam_tween_director.set_to_type(TweenDirectorResource.TYPE.TWEEN_RESOURCE)

# Apply using int
pcam_tween_director.set_to_type(1)

Getter

int get_to_type()

Example
gdscript
pcam_tween_director.get_to_type()

to_phantom_cameras

Type: Array[NodePath]

Default: []

The list of PCams that should trigger the tween_resource override when tweened To.


Setter

void set_to_phantom_cameras(Array[NodePath] value)

Example
gdscript
pcam_tween_director.set_to_phantom_cameras()

Getter

Array[NodePath] get_to_phantom_cameras()

Example
gdscript
pcam_tween_director.get_to_phantom_cameras()

to_tween_resources

Type: Array[PhantomCameraTween]

Default: []

The list of PCams with the PhantomCameraTween resources applied to them that should trigger the tween_resource override when tweened To.

Important

The tween resources on the list must be saved on the filestyle.


Setter

void set_to_tween_resources(Array[PhantomCameraTween] value)

Example
gdscript
pcam_tween_director.set_to_tween_resources(phantom_camera_tween_resources)

Getter

Array[PhantomCameraTween] get_to_tween_resources()

Example
gdscript
pcam_tween_director.get_to_tween_resources()

Made with ♥ in Vitepress