0 votes

I have the following AnimationTree setup (at root):

The "combat-loop" is a BlendState, which looks like this:

And, in physicsprocess, I do this:

var anim_speed = velocity.length() * 0.8
var root_anim = "idle-loop"

# set the top-level animation node (idle, walk or combat)
# walk?

if character.combat_toggled:
    root_anim = "combat-loop"
elif is_moving:
    root_anim = "walk-loop"

# set it
if animRoot.get_current_node() != root_anim:

if root_anim == "walk-loop":
    animationTree.set("parameters/walk-loop/walk/blend_position", input_direction)
    animationTree.set("parameters/walk-loop/speed/scale", anim_speed)
elif root_anim == "combat-loop":
    var locomotion = animationTree.get("parameters/combat-loop/locomotion/playback")
    var sub_action = "walk-loop" if is_moving else "idle-loop"

    if locomotion.get_current_node() != sub_action:

    if sub_action == "walk-loop":
        animationTree.set("parameters/combat/walk-loop/walk/blend_position", input_direction)
        animationTree.set("parameters/combat/walk-loop/speed/scale", anim_speed)

the animRoot is the StateMachine at the root of the AnimationTree.

I'm getting this error:

E 0:00:02.505   _blend_node: Condition "!p_node.is_valid()" is true. Returned: 0
<C++ Source>  scene/animation/animation_tree.cpp:185 @ _blend_node()

Does anyone have any idea what's wrong here?

in Engine by (120 points)

1 Answer

0 votes

Turns out the scene was corrupted somehow. Re-creating it fixed the issue.

by (120 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.