fake-3D-pixel-art icon indicating copy to clipboard operation
fake-3D-pixel-art copied to clipboard

animation directions are off

Open LateNightIceCream opened this issue 2 years ago • 4 comments

Hi, I cloned the project to try it out and noticed that the walking / running directions seem to be wrong, e.g. left is switched with right.

https://github.com/pixelrogueart/fake-3D-pixel-art/blob/06124fc156142735cc60bcb07ef2adb092245864/scripts/global/game_libraries.gd#L3-L12

This configuration works for me:

var anim_directions = {
	"up": 6,
	"down": 1,
	"left": 0,
	"right": 5,
	"up-left": 7, # 5
	"up-right": 3,
	"down-left": 2,
	"down-right": 4,
}

I see that you are using this dictionary to index the animation_files array. I'm on Linux and maybe the order the files are read is different. I put a print statement inside the read_folder function of skin_manager.gd to check the file path order and it is as follows:

res://animations/walk/4.png
res://animations/walk/2.png
res://animations/walk/1.png
res://animations/walk/9.png
res://animations/walk/3.png
res://animations/walk/6.png
res://animations/walk/8.png
res://animations/walk/7.png

Can you reproduce this?

LateNightIceCream avatar Feb 14 '23 10:02 LateNightIceCream