PhantomCameraTweenDirector
Inherits: Node
Using the TweenDirectorResource, this node allows for custom tweens between specific PCams in a scene.
Whenever a tween between two PCams occurs, this node can override the PhantomCameraTween applied to the newly active PCam if an instance on both the From and To lists match the previously and newly active PCam respectively.
Example use case
Let's say you have 4 Phantom Cameras, PCamA, PCamB, PCamC and PCamD, and you want a unique tween duration and ease when the camera tweens from PCamA to PCamC, but want the tween to PCamC otherwise be the same in all other instances.
The TweenDirectorResource allows for setting a custom tween_resource along with PCams in a From and To list. If PCamA is added to the From list, and PCamC is added to the To list, then whenever the priority shifts from PCamA to PCamC that custom tween_resource will be used instead of what has been declared in PCamC.
If you then later want to use the same custom tween_resource when PCamA tweens to PCamD, then it's just a case of adding PCamD to the same To list as PCamC.
TIP
Multiple PhantomCameraTweenDirector instances can be in a given scene with different TweenDirectorResource lists. This can be useful for better scene management.
Video Example
Properties
tween_director
Type: Array[TweenDirectorResource]
Default: []
Overrides the PhantomCameraTween between targeted PhantomCameras based on the TweenDirectorResources.
Setter
void set_tween_director(Array[TweenDirectorResource] value)
Example
pcam_host.set_tween_director(tween_director_resources)Getter
Array[TweenDirectorResource] get_tween_director()
Example
pcam_host.get_tween_director() # Returns the list of TweenDirectorResources applied