my wall jump is ok but my character can also climb kinda and i'm not sure how to avoid that.
any ideas ?

i use this for my ascending and falling state:

if !is_on_floor() and !is_on_wall() and !is_on_floor_only() and !is_on_wall_only():
		#apply gravity
		velocity.y += gravity * delta
		
		if velocity.y < 0 :
			_set_state(states.is_ascending)

		if velocity.y >= 0:
			_set_state(states.is_falling)

and this for the sliding state:

elif is_on_wall_only():
		_set_state(states.is_sliding)

i dont put all my code but then my wall jump is like that: (i use another function for the usual jump)

func _wall_moves(delta):
	velocity = Vector2.ZERO
	direction = -wall_normal.x

	if Input.is_action_pressed("jump"):
		velocity = Vector2(wall_normal.x, jump_force)

did you encounter the same problem? i tryed a few stuffs but it didn't go as expected, i'm looking for the best method kinda.
how would you fix that?

thx.

You could require opposite input to wall jump like some games like Metroid do it (make sure to add "coyote time")

You could try having the jump move the player away from the wall before returning full air control, similar to how Mario games handle it

You could disallow jumping from one wall to the same wall, if that is what you want

    award

    award You could require opposite input to wall jump like some games like Metroid do it

    I did a fast try and it was working well but i can still climb with a left-right or right left move. i will dig the idea a bit later, it's 8:30am here and i didn't sleep yet. ^^;
    if i get a wall sliding speed fast enough, it could maybe make the climbing impossible.

    award make sure to add "coyote time"

    i'm not very familiar with it, not sure if i will add one.

    award You could try having the jump move the player away from the wall before returning full air control, similar to how Mario games handle it

    yeah i wanted to do that too but i need to change the way i handle velocity in the script for that so maybe.
    for now, when i jump, i can still control the movement of my character going right or left when falling.

    award You could disallow jumping from one wall to the same wall, if that is what you want

    i cannot do that because my gameplay could allow the player to get back on the same wall through other means.

    thank you, it give me some ideas to go on.

    my code is a bit messy, i will make a is_wall_jumping state later i guess but i'm kinda satisfied for now, i will see how it goes with the rest of the gameplay.

    func _wall_moves(delta):
    	velocity = Vector2.ZERO
    	direction = -wall_normal.x
    	velocity = Vector2(-wall_normal.x,50)
    	
    	if Input.is_action_pressed("jump") and Input.get_axis("left", "right") == -direction:
    		velocity = Vector2(wall_normal.x, jump_force)
    		just_wall_jumped = true
    func _move(delta):
    	if just_wall_jumped == false:
    		if Input.is_action_pressed("right"):
    			velocity.x = direction*speed*delta
    		elif Input.is_action_pressed("left"):
    			velocity.x = direction*speed*delta
    		else:
    			velocity.x = 0
    	elif just_wall_jumped == true:
    		velocity = Vector2(wall_normal.x*wall_jump_speed*delta, wall_jump_force)
    		await get_tree().create_timer(0.15).timeout
    		just_wall_jumped = false
    		#make a wall_jumping_state

    thx for the help