Add teleport_xfade to AnimationNodeStateMachine
#112709
Draft
+181
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
default_transitionfor travel requests among non-connected states #102784Context: #98617 (comment)
Implementing proposal godotengine/godot-proposals#11769 as teleport xfade options.
This makes transitions with crossfade between states without transition paths by storing the current state into
fading_fromat the teleport moment.Add default crossfade options to the NodeStateMachine properties.
Also, add an optional argument to
travel()for setting different crossfade durations per instance.The previous implementation #102784 tried to allow adding path between states without transitions to the queue, but it would invade pathfinding iterations and become overly complex.
Therefore, as a minimal implementation, this PR only set a one-time crossroad that is active only when teleportation between two states. Then, I think users can handle complex cases by subscribing state and signal.