for my game, because it is not a eagle eye, the shooting animation would have been hell to animate so I had to think of something and i realised i could stop the player from moving when he wants to aim and shoot (like the original RE4) but i have no idea how to code the animation part.
8 ways and i dont know how to call them in the code… should I use PI? how should i use it? and i should make a new animation tree for it? or animatedSprite would be enough?
You can use the player’s velocity / input vector and a series of if statements to check what direction the player is moving in and then play the corresponding animation. Using AnimationTree, you can skip all that code and pass the input vector into a BlendSpace2D and it will automatically choose the correct animation for you. I don’t think you need PI, though
AnimationTree is pretty complicated so I recommend looking up a tutorial for it.
You need an AnimationPlayer with an animation for each angle of every animation. Then you will need to make a state machine in an AnimationTree, and then make blendspace2ds in that state machine. You will need to put in all the animations into the blend spaces and then via code pass in the input vector to all blendspaces