Splitting sprite

Godot Version

Godot 4.4

Question

`Hey! Been struggling with this for a while, couldn’t find anything on YouTube so decided to make my first post here.

I would like to split my characters sprite in 2 when an attack animation is played to avoid skipping animation frames when running and attcking. Any help appreciated (2D game). To sum up id like the top half of the sprite to attack while the legs keep the running animation.

Thank you!

Hiiii :smiling_face:. I think I would need a bit more info about your combat system :sweat_smile:. But :open_mouth::

(All of this is with an Animation Node Blend Tree)

(Asuming you’re using sprites and not bones :sweat_smile:)

If it is a simple or a few simple attacks :thinking:, I think you could use an BlendSpace2D in Capture mix mode :grin:(Its in a drop down in the blend space 2D configuration, in its top bar :open_mouth:).

If its something more complex :sweat:, I strongly recomend you to separate the legs and top to their own sprites with your image editor and control them indepently :thinking:.

(Asuming you’re using bones :upside_down_face:)

You can have Transitions nodes or anything connect to a blend2 :smiling_face:(Having the Upper Half in one input and the legs in the other :open_mouth:) and use the Filter option :grin:. Just mark what bones you’re using in the blend input :grin:

Hope that helps :smiling_face:

You’ll need to have both halves already split. Heartbeast is doing a tutorial series with a system like that here https://www.youtube.com/playlist?list=PL9FzW-m48fn0_0sTPuSDHsloz6NhZyXkK