How can i make the character fall down slower after the jump. What is the right way to change the gravity on the landing part only.
Still learning. I use lates version of Godot.
`extends CharacterBody2D
var speed = 200
var jump_speed = -550
var gravity = 1000
var friction = 0.1
var acceleration = 0.25
func _physics_process(delta):
_facing()
velocity.y += gravity * delta
var dir = Input.get_axis("ui_left", "ui_right")
velocity.x = lerp(velocity.x, dir * speed, acceleration)
move_and_slide()
if Input.is_action_just_pressed("ui_accept") and is_on_floor():
velocity.y = jump_speed
$Jump.play()
func _facing():
if velocity.x >0:
$Sprite2D.flip_h = false
elif velocity.x < 0:
$Sprite2D.flip_h = true
`