0 votes

So, I've been surfing the internet for about two weeks now and have yet to find an answer to this. How do you animate a character that is composed of different body parts, and change them as it animates/moves?

The character is composed of those following:
- a body with legs and one arm
- interchangeable arm depending on action taken (attack, shoot, etc.)

How do I make it so when the character do an action, the character animates with those interchangeable images?
The only solution that I have found so far is that I have to write my own animator in either GDScript or C++. I honestly want to leave that as a last resort though, not because I don't want to, more on the lines, that I know it's gonna cause some performance issues.

If you know of a way to do this, please let me know. I've tried using AnimatedSprite, AnimatedPlayer/Tree, and none seem to do what I want. Not even that whole cutout animation is not what I'm looking for.

in Engine by (16 points)

2 Answers

+1 vote
by (1,469 points)

Haha, I was just about to point the OP there but you beat me to it :)
It's a fantastic tutorial btw

Unfortunately this isn't what I'm looking for, it's the same thing as the Cutout animation tutorial in the godot docs. I believe I'll just have to create my own animator inside the source code, or I might just write it using GDScript.

I need to animate literally multiple body parts (Arms, Bodys, Heads, etc.), while this animation technique might work if you just have one whole set of the character, but I have multiple for different actions that the character may take. The animation in the end is technically considered Frame-by-Frame, but not exactly. I'm currently looking into 2D Skeletal animation using Dragon Bones, but the editor doesn't seem to accept the animation (JSON), and then I also realize it spits out a texture atlas, and with 100+ images...that's going to be a bit too big imo. If there are any other options, please let me know.

0 votes

Turns out the answer was pretty much in front of my face. I ended up using AnimationPlayer to be able to animate the different parts correctly. Though it did take some trial and error to get it correct, it worked out better than I thought it would.

Thanks for the other answers I do appreciate it, if anyone has the same issue I had, use AnimationPlayer, it might be a little tricky to use at first, but once you get the hang of it; it's very simple and powerful.

The answer given my @Jospic is what lead me to trying it out, and it worked out really well.

by (16 points)

How did you swap pieces during animation?

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 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 webmaster@godotengine.org with your username.