Solarus Forum

Solarus => Development => Topic started by: Bagu on May 13, 2018, 07:11:18 pm

Title: Shield Animations Reverse Direction for Sword Attacks
Post by: Bagu on May 13, 2018, 07:11:18 pm
I'm in the process of creating a custom "tall" link sprite, and I'm running into a strange issue with shield animations. The shield's walking animations work fine, but durring sword attacks, the directions get reversed.

In other words, the shield plays the "down" animation during an upwards sword strike, and the "up" animation during a downwards sword strike. I believe Solarus is reversing the shield's left and right sword animations as well, though it's hard to tell since they appear to be clipping behind Link's body.

What could be causing this? You can see from the video that the animation frames and directions are set up just like any other situation.

https://youtu.be/t8LHJsMhSMs

(Please excuse the WIP art, the frames are very rough and I still have a lot of polishing to do.)
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Diarandor on May 13, 2018, 10:56:44 pm
This is weird. Are you sure that your sprite file was correctly saved when you ran the project? I think that when you use the "up" direction on the hero, the shield appears with the "right" direction and not the "down" direction. Could you share a link to your project so that we can find the problem?
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Bagu on May 14, 2018, 03:22:06 am
Thanks for the help. Here's a dropbox link: https://www.dropbox.com/s/61f7lmv2d7em2e7/tallspritetest.zip?dl=0
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Diarandor on May 14, 2018, 04:47:50 pm
I confirm that this seems an engine bug. I will open an issue for this.
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Diarandor on May 14, 2018, 04:53:29 pm
Link to the issue: https://github.com/solarus-games/solarus/issues/1185
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Bagu on May 15, 2018, 12:45:16 am
Thanks again for the help. I suppose there's probably ways I can work around the bug until it's eventually fixed.
Title: Re: Shield Animations Reverse Direction for Sword Attacks
Post by: Diarandor on May 18, 2018, 10:23:41 pm
Chris has fixed this for the dev version of Solarus. The fix will appear in the official version 1.6 of Solarus when it is released.