Skip to content

Tween

Defines how PCams transition between one another. Changing the tween values for a given PCam determines how transitioning to that instance will look like.

This is a resource type that can be either used for one PCam or reused across multiple.

By default, all PCams will use a linear transition, easeInOut ease with a 1s duration.

Instant Transitions

To have an instant transitions, simply apply a value of 0 to the duration property.

Video Examples

Properties

duration

Type: float

Default: 1

Defines how long the transition to this PCam should last in seconds.


Setter

void set_tween_duration(float duration)

Example
gdscript
pcam.set_tween_duration(4.2)

Getter

PhantomCameraTween get_tween_duration()

Example
gdscript
pcam.get_tween_duration()

transition

Type: int

Default: 0

Defines the Transition type for the tweening to this PCam using the PhantomCameraTween.TransitionsType enum.

Transition NameValue
LINEAR0
SINE1
QUINT2
QUART3
QUAD4
EXPO5
ELASTIC6
CUBIC7
CIRC8
BOUNCE9
BACK10

Setter

void set_tween_transition(int transition_type)

Example
gdscript
pcam.set_tween_transition(2)

# Instead of applying an int directly,
# it's also possible to supply an enum value like so:
pcam.set_tween_transition(pcam.PhantomCameraTween.TransitionType.QUINT)

Getter

int get_tween_transition()

Example
gdscript
pcam.get_tween_transition()

ease

Type: int

Default: 2

Defines the Ease type for the tweening to this PCam using the PhantomCameraTween.TweenEases enum.

Ease TypeValue
EASE_IN0
EASE_OUT1
EASE_IN_OUT2
EASE_OUT_IN3

Setter

void set_tween_ease(int ease_type)

Example
gdscript
pcam.set_tween_ease(0)

# Instead of applying an int directly,
# it's also possible to supply an enum value like so
pcam.set_tween_ease(pcam.PhantomCameraTween.EaseType.EASE_IN)

Getter

int get_tween_ease()

Example
gdscript
pcam.get_tween_ease()