Animation Tree Blendspace2D not blending move directions properly

Hello!

It's my second time using Godot to make a game. I'm attempting to animate a 2D sprite within a 3D world. I've been loosely combining Heartbeast's Action RPG series and BornCG's Creating A Simple 3D Game series, for reference of the code and world.

My issue is that while my walking and idle animations for Left, Right, and Down directions function properly, pressing Up will only play the Down animations for both idle and walking states, making my character moonwalk instead of letting me watch them go :<

The animation player's WalkUp and IdleUp animations are correct, it's just that for some reason, blendspace2D seems not to recognize it despite having the points in there... I've found that shifting the points around will change which direction animations are being ignored.
(for example, moving the IdleDown point towards the center within blendspace diamond will cause the opposite effect: the Down animations won't play, replaced by Up)

--- Here is the character's code:

--- Blendspace2D showing that IdleUp is planted within the blendspace (same for Walk):

--- Animationtree settings and set-up:

if anything else is needed, please let me know! i'd like to solve this issue without having to code in a work-around, but if must be, then it must be so.

Answers

  • GlyphTheWolfGlyphTheWolf Posts: 6Member

    Hi,

    I would check setting of blend_position for your blend space.

    From code you added your input_vector is Vector3, but you are using BlendSpace2D, so you only have 2 coordinates to set: X and Y. You are setting X and Z in your input_vector, so from what I would expect Y is always 0.

    I think maybe just using Vector2(input_vector.x, input_vector.z) while setting blend_position will help?

    Blend space should work fine itself. I use it for my 3D animations and it seems to work ok with properly set blend_position.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file