Hello everyone, currently the code i am using is where, if the characters jump and the direction is to the right, it plays the move-jump-right. However, if i pressed left, it plays move-jump-right animation. How to solve this or is there a way to properly implement the code? thank you.
if self.velocity.y > 0 and self.direction.x > 0 then
play_animation(self, hash("move-jump-right")) print("Jumping on right") elseif self.velocity.y > 0 and self.direction.x < 0 then play_animation(self, hash("move-jump-left")) print("Jumping on left") end