RigidBody.MovePosition in 2 speeds?

i want to move my rigidbody into 2 directions at the same time.

(0f, 0f, 1f) at the speed of 20f;

and at the same time (inputf, inputf, 0f) at the speed of 5f;

how can i do that?
i tried:

    private void FixedUpdate()
    {
        if (IsPressing && MoveLegal)
            m_Rigidbody.MovePosition(transform.position + m_Input * Time.deltaTime * 5f);
       
        m_Rigidbody.MovePosition(transform.position +  new Vector3(0f, 0f, 1f) * Time.deltaTime * Speed);
    }

but since it only works the first time on MovePosition, the second one just wont work.
what should i do?

thanks in advance!

MovePosition doesn’t move the position there and then, it moves it during the simulation step. You cannot issue multiple independent moves like this, only the last one will be used.

You cannot move in two different directions as that physically cannot happen. You can however combine the vectors and issue a single move in the resultant direction.