0 votes

Hello, community, and happy New Year everyone!

i am working on a 2d platformer-shooter game. The character can jump and shoot a gun.

Let's say shooting is an animation with 5 frames. It primarily affects the top part of the body (raising the gun, shooting, a bit of knock-back, lowering the gun). And everything is relatively easy when the character is idle on the ground.

But what if he shoots while jumping or running? Let's say running is an 8-frame animation. The player can press shoot on any of the frames. And I want the shoot animation to not interrupt the run animation and be smoothly connected to it.

Seems like the solution here is to draw 8 different shoot animations each beginning on different frames of the run animation. But that doesn't sound right.

What would you recommend for this problem? I am sure many other game makers have faced a similar issue. What comes to my mind is some way to have separate animations for the top and the bottom of the body. So that while the bottom is running or jumping, the top is shooting. If it is the best way - how would you go about implementing that?

Thanks, Godot is amazing

Godot version 3.2.3
in Engine by (12 points)

1 Answer

0 votes

Yes, you need two separate animations for weapon and body.
Here's one of the ways to do it https://www.youtube.com/watch?v=BQwNiU5v9as

by (1,650 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.