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

`

Probably something like

if velocity.y > 0 and !is_on_floor:
     gravity = down_gravity

then change it back when is on floor

    fire7side Thx for your time it did not work. i was searching in this direction. I hope to find an answer 🙂 A lot of tutorials show this movement but non is explaining how to change gravity on falling or landing after a jump 🙂

      Realspawn
      This is what the complete code would look like

      func _physics_process(delta):
      	# Add the gravity.
      	if not is_on_floor():
      		if velocity.y > 0:
      			gravity = fall_gravity
      		else:
      			gravity = gravity_rising
      		velocity.y += gravity * delta
      
      
      	# Handle Jump.
      	if Input.is_action_just_pressed("ui_accept") and is_on_floor():
      		velocity.y = JUMP_VELOCITY
      		
      
      	# Get the input direction and handle the movement/deceleration.
      	# As good practice, you should replace UI actions with custom gameplay actions.
      	var direction = Input.get_axis("ui_left", "ui_right")
      	if direction:
      		velocity.x = direction * SPEED
      	else:
      		velocity.x = move_toward(velocity.x, 0, SPEED)
      
      	move_and_slide()

      I tried it. I didn't copy the variables but you need one for gravity, fall_gravity, and gravity_rising. You can have gravity = either one at the start.

        fire7side
        That's it 🙂
        Still tinkering with this but it is what i was looking for. Thank you for taking the time to explain.