Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Lolzsicka (school) |
this is what i have for physics process function:
velocity = move_and_slide_with_snap(velocity, Vector2.UP)
velocity.x = 0
velocity.y += gravity * delta
if Input.is_action_pressed("left"):
velocity.x -= speed
if Input.is_action_pressed("right"):
velocity.x += speed
if Input.is_action_just_pressed("jump"):
if is_on_floor():
velocity.y = jump_speed
for some reason the jump doesnt work and i cant seem to figure it out.