Diagonal Movement in 2D Game

I’m trying to make a game that involves jumping from the ground, to a wall, and wall jumping to another wall. I’m trying to code it so that I can jump diagonally left onto a wall as a start. The farthest I’ve gotten is making a jump mechanic that sets a boolean to true, and when the boolean is true it moves left. However, it does not move diagonally as intended. Instead it will jump, then slow down, then start heading left, so it kinda makes like a 90 degree angle. I want it to move diagonally but I can’t figure out how.

@SchylerMakesGames

Show your code if you want some meaningful answers… also, you didn’t actually share any details, only rough steps what you have done and what happens.

It also sounds like you should maybe watch some platformer tutorials first?

After doing that, this is what I would try to do:

First make a working jump, then try to figure out how to detect a wall contact. Then when you can detect this condition, you can stop character falling/slow down falling and enable jumping from a wall.

 void OnCollisionStay2D()
    {
        collision = true;
        moveLeft = false;
    }

    private void OnCollisionExit2D()
    {
        collision = false;
        moveLeft = true;
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space) && collision)
        {
            rb.velocity = Vector2.up * jumpForce;
            collision = false;
        }
        if (moveLeft)
        {
            rb.velocity = Vector2.left * sideForce;
        }
       
    }

I have the simple jump mechanic set up, and it detects the collision on the walls so that it can jump again. This code causes the square I have to jump up and then shortly after just start going left, in a 90 degree angle. I would like it to go in a continuous diagonal line until it detects a collision like the wall. I cannot figure out how to do this. I’m also a beginner so bear with me. Thanks

I have also considered causing the walls to move when the square jumps so that it appears that it is jumping diagonally but I think that might mess things up later on.