Animation problem in gdevelop

I am trying :sweat_smile:

Any problems? (20 char)

Is it correct

Sort of, but this, keep this as child of this and not this:

Yes, like this. Have you tried it?


Doing this is only adding or decreasing the force of player (I tried many numbers but still not working)

Can you show a .gif showing what you are actually telling?

Hi you need to go frame by frame in the spin animation and there move the points to fit exactly how much the character has been moved.

Do not change the position of X in events that maybe throw some other issues like you character can end inside a wall or an obstacle when the animation is finished

Maybe not when you manage the HitBox

Soory I am replying after 2 hours actually there was no light so …
If I do not have to change the X position then what I need to do?
These are my events-


My spin animation have 25 frames

When the spin attack is completed, you will have to move your player to the final position of the spin attack animation. There are no two ways about it.

Add an event to check whether the animation is spin attack, and if it has finished playing change the animation to idle and add a number of pixels to your player’s x position (experiment with this until it is the same spot as the final spin attack position).

You’ll need to subtract the same number from the player x position if the spin attack is to the left.

[edit]
To avoid getting the player stuck in, say, a wall, do a collision check if the animation is spin attack, and move the player away from the wall while the animation is playing.

This of course assumes you have the collision box moving with each frame of the spin attack animation.

As mentioned in other threads, hitbox doesn’t have anything to do with animations nor positioning. It only impacts collisions.

Ulises is correct, the origin points need to be adjusted.

The origin of each frame? Then the player will spin on the spot, rather than spin and move to the left or right. And I don’t think that’s what the intention of the animation. I believe the player needs to be repositioned once the spin attack animation has completed. Just like any fighting game.

I agree, but I think it’s easier if they adjust the origin point then apply movement while the animation is happening.

Applying movement after the animation ends can lead to weird issues where they end up in the middle of a wall or past a barrier.

Sure, and that’s where there has to be a collision check during the animation, just as if the player was moving.

Yep, agreed. but if you center the animation (or at least the points), you don’t have to do anything fancy beyond use the normal collision logic since you’re simulating the movement using the behavior already.

Hmmm, it wouldn’t be my chosen method, but this gives the OP a choice to what way to use.

1 Like

Yeah, I think both methods work. I just mainly use “The sprite is always the center” as a learned habit from examining Metroidvania hitboxes.

About half my design decisions nowadays are based off how Symphony of the Night or Hollow Knight did it. :laughing:

2 Likes

Please tell me straight forward what should I do next … Still confused
My events-


And while previewing-com-gif-maker%20(3)

I am stuck there only