Fixed player accelerating downwards while standing on the ground.

godot4-port
unfa 2020-06-14 21:23:10 +02:00
parent b536ce2c36
commit d1b5943677
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ var walkDirInt = Vector2.ZERO
# var b = "text"
func gravity():
self.velocity.y -= GRAVITY
if not is_on_floor():
self.velocity.y -= GRAVITY
remote func walk(direction: Vector2):