Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Repertix |
When using move_and_slide_with_snap()
the player doesn’t jump. When using is_on_floor()
doesn’t make it jump, I checked if it wasn’t detecting floor but it does, shows true
when is on floor.
This is how the code looks
var snap = Vector2.DOWN * 16
if is_on_floor():
if Input.is_action_just_pressed('jump'):
motion.y = -jumpforce
motion = move_and_slide_with_snap(motion, snap, Vector2.UP)