Help with animations not working correctly

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Seth144k
Prole
Posts: 29
Joined: Wed Jan 19, 2022 8:45 pm

Help with animations not working correctly

Post by Seth144k »

Hi! So I am having issues playing animations using a library called anim8. Whenever I specify grid("1-3", 1) the animation plays normal and just fine. But when I want it to go to grid("4-6", 1) for the left walking sprites, for some reason it gets distorted and doesnt display correctly. The same thing happens if i just try and switch rows. Can somebody please provide a working solution for me to work with and explain, thank you!
Attachments
animationwrong.love
(703.6 KiB) Downloaded 26 times
Taro
Prole
Posts: 4
Joined: Fri Mar 01, 2024 1:41 am

Re: Help with animations not working correctly

Post by Taro »

Hi, I saw the archive and checked the player.lua and it seems that the problem isn't from the file, is from the spriteSheet image. For a correct animation anim8 all the sprites have to be the same size in order (for example : if 1 sprite is 32 x 32, the other have to be 32 x 32). So you need to order the sprites of the spritesheet so each one fits in the grid

Sorry for the long text, hope this help :D
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 63 guests