Rigidbody Character/Vehicle Moves Slowly and Slides Down Slopes

I am using a Rigidbody to control and move my character along uneven terrain, which is causing it to slow down and slide down slopes. I’ve messed with the gravity settings, the Rigidbody mass, drag, using gravity, and I’ve tried using different materials with different functions to no avail. I’m using this line of code to move the character:

rb.velocity = marker.transform.forward * (Input.GetAxis ("Vertical") * 7);

And I’m also using this code snippet to rotate the player to match the slope of the ground as well as allow it to rotate around its local y axis:

Quaternion q1 = Quaternion.AngleAxis(angle, finalUp);
            Quaternion q2 = Quaternion.FromToRotation(Vector3.up, finalUp);
            Quaternion quat =  q1 * q2;                   

            marker.transform.localPosition = (hitp + finalUp * distance);
            marker.transform.rotation = quat;

            angle += Input.GetAxis ("Horizontal") * 2;

How do I stop the player from sliding down and slowing down on slopes?

You need to project the vector of the movement on the slope. Use Vector3.Project for this purpose.

I’m sorry, but I don’t quite understand what you mean by projecting the movement on the slope. Could you explain what you meant?

Is setting the velocity equal to the speed in the direction of the character’s relative forward theoretically not enough since it always rotates to match the slope of the ground?

I have solved the problem, for anyone who looks at this later and wants to use this code. Line 5 of the second code block, where the local position was updated, was causing my character to slow down. It handled keeping my character floating above the ground. Simply removing it fixes the problem, but you can use another method to keep the distance from the ground:

if (hit.distance < distance || hit.distance> distance) {
            float change = distance - hit.distance;
            rb.MovePosition (new Vector3 (marker.transform.position.x, marker.transform.position.y + change, marker.transform.position.z));
        }