You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot v4.3.dev3 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sat Feb 10 09:40:02 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU () - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)
Issue description
When traveling into a node in an AnimationNodeStateMachine which type is Grouped using the root state machine's AnimationNodeStateMachinePlayback a couple of warnings and errors will appear in the Debugger tab.
Root state machine:
Inner state machine attack (set as Grouped):
Steps to reproduce
Create an AnimationTree
Add an AnimationNodeStateMachine as root
Add an AnimationNodeStateMachine as a node to the other state machine and set its type to Grouped
In the inner state machine, create a couple Animation nodes and connect the Start node to each one. Connect each Animation node to the End node.
In a script, using the AnimationNodeStateMachinePlayback of the root state machine, try traveling to a node in the inner state machine. In the Debugger the following warnings and errors will appear:
W 0:00:02:0772 _set_current: There are two or more transitions from the Start of Grouped AnimationNodeStateMachine in AnimationNodeStateMachine: parameters/attack, which may result in unintended transitions.
<C++ Source> scene/animation/animation_node_state_machine.cpp:226 @ _set_current()
W 0:00:02:0772 _set_current: There are two or more transitions to the End of Grouped AnimationNodeStateMachine in AnimationNodeStateMachine: parameters/attack, which may result in unintended transitions.
<C++ Source> scene/animation/animation_node_state_machine.cpp:229 @ _set_current()
E 0:00:02:0772 _set_current: There is a mismatch in the number of start transitions in and out of the Grouped AnimationNodeStateMachine on AnimationNodeStateMachine: parameters/attack.
<C++ Source> scene/animation/animation_node_state_machine.cpp:232 @ _set_current()
E 0:00:02:0772 _set_current: There is a mismatch in the number of end transitions in and out of the Grouped AnimationNodeStateMachine on AnimationNodeStateMachine: parameters/attack.
<C++ Source> scene/animation/animation_node_state_machine.cpp:235 @ _set_current()
This is the intended behavior: the Transitions to Start and End in a GroupedStateMachine refer to the Transitions of the parent, so correctness for the behavior is not guaranteed if their numbers do not match. To solve this problem correctly, an implementation such as indexes to tie between ports and transitions together is required. See also #75759 description.
If the parent has only one Transition and the GroupedStateMachine has more Transitions than the parent, some consistency is guaranteed, but that would be the only exception.
If the parent has no Transitions and the GroupedStateMachine has Transitions, it will be broken because there is nothing to reference. Also, if the parent has more Transitions than GroupedStateMachine, the user cannot decide neither know which Transition will be referenced.
Uhm, I see. I think I get what you mean. So the transitions that go to and from a GroupedStateMachine need extra information like to which node to go when starting and which transition to use when ending, right? Makes sense. Right now, in my example, if I were to do travel("attack") it wouldn't know to which node in the grouped state machine to go.
Tested versions
Reproducible in: v4.2.1.stable.arch_linux, v4.3.dev3.official [36e943b]
System information
Godot v4.3.dev3 - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sat Feb 10 09:40:02 UTC 2024 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU () - AMD Ryzen 9 5900HX with Radeon Graphics (16 Threads)
Issue description
When traveling into a node in an
AnimationNodeStateMachine
which type isGrouped
using the root state machine'sAnimationNodeStateMachinePlayback
a couple of warnings and errors will appear in theDebugger
tab.Root state machine:
Inner state machine
attack
(set asGrouped
):Steps to reproduce
AnimationTree
AnimationNodeStateMachine
asroot
AnimationNodeStateMachine
as a node to the other state machine and set its type toGrouped
Animation
nodes and connect theStart
node to each one. Connect eachAnimation
node to theEnd
node.In a script, using the
AnimationNodeStateMachinePlayback
of the root state machine, try traveling to a node in the inner state machine. In theDebugger
the following warnings and errors will appear:But it seems to work fine otherwise.
Minimal reproduction project (MRP)
test_grouped_state_machine.zip
It's just a
tscn
file. Pressui_accept
to toggle fromidle
toattack/cut
orattack/slash
and back.The text was updated successfully, but these errors were encountered: