Ground check for jumping

godot4-port
unfa 2020-06-14 21:20:49 +02:00
parent edea49ca89
commit b536ce2c36
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ remote func walk(direction: Vector2):
remote func jump():
print("JUMP")
velocity.y = JUMP_VELOCITY
if is_on_floor():
velocity.y = JUMP_VELOCITY
remote func mouselook(rel):
self.rotate_y(- rel.x * MOUSE_SENSITIVITY)