Download

Sprite direction after taking damage

After taking damage my sprite animation flip to other direction as i programed it like that but i want it to not change direction when it take damage.
2021-04-23_20-12-34

check in this gif. Death animation is not right as well. Any solution?

2021-04-23_20-13-01

Instead of flipping it, just set its direction to face backwards; i.e. instead of direction = -direction, do direction = -1.

Thanks.

Thanks i will try that.

Here are the blueprints. still not able to understand how i can add that into this logic… I followed tutorials but they did not added any solution for this

Animation rotation logic, i just want to not rotate the animation when i add impulse after taking damage.

I’m assuming you want it to always face the current movement direction when taking damage.
Try this for the first picture:

Though, a better solution would be to change the direction of the character based on input instead of velocity. This will simplify things a lot.

1 Like

Thanks. Really appreciate your effort. Got the idea.