Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | chris33556 |
hi all,
so i’m trying to add the jump animation called surprisingly “jumping”. and i’m using input vector.y < 0 to make the animation play on line 31. however , its not working as shown in the gif:
here is the paste bin script link:
can someone suggest how i can get the animation to work thank you
I don’t know how I can help you, but I can help with your jump()
function:
func jump():
if is_on_floor() and Input.is_action_pressed("jump"):
# This had the comparison operator, `==`, instead of the assignment operator, `=`.
jump = true
velocity.y = jump_impulse
Ertain | 2022-07-09 23:39
The most common cause of this is a difference like a capital letter in the names etc. Does the name of the animation begin with a capital J for example but your code uses a lower case?
Gluon | 2022-07-10 00:02