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
Tween Resource
Type: PhantomCameraTween
Default: null
The resource that defines how this PCam should be transitioned to.
Can be shared across multiple PCams.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void set_tween_resource(PhantomCameraTween tween_resource)
Example
pcam.set_tween_resource(tween_resource)Tween Duration
Type: float
Default: 1
Defines how long the transition to this PCam should last in seconds.
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Tween Transition
Type: int
Default: 0
Defines the Transition type for the tweening to this PCam using the Constants.TweenTransitions enum.
| Transition Name | Value |
|---|---|
| LINEAR | 0 |
| SINE | 1 |
| QUINT | 2 |
| QUART | 3 |
| QUAD | 4 |
| EXPO | 5 |
| ELASTIC | 6 |
| CUBIC | 7 |
| CIRC | 8 |
| BOUNCE | 9 |
| BACK | 10 |
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void set_tween_transition(int transition_type)
Example
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.Constants.TweenTransitions.QUINT)Tween Ease
Type: int
Default: 2
Defines the Ease type for the tweening to this PCam using the Constants.TweenEases enum.
| Ease Type | Value |
|---|---|
| EASE_IN | 0 |
| EASE_OUT | 1 |
| EASE_IN_OUT | 2 |
| EASE_OUT_IN | 3 |
Note: During runtime, properties should be modified and read via their setters & getters respectively.
Setter
void set_tween_ease(int ease_type)
Example
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.Constants.TweenEases.EASE_IN)