Rigidbody Velocity and Collision

I decided to use a rigidbody for my player instead of a character controller for a number of reasons. So far it’s going great, but I have a slight problem. If I run against a wall and I jump and touch it in the air, I will get stuck in it and stay in the air for as long as I press the movement button with the direction against the wall.
All the movement functions are in FixedUpdate. Here’s my line for the movement:

if(rigidbody.velocity.magnitude < maxSpeed)
rigidbody.velocity += transform.TransformDirection(Vector3(serverHInput * 150 * Time.deltaTime, 0, serverVInput * 150 * Time.deltaTime));

I’ve also tried transform.Translate andrigidbody.AddForce,none of them fixes the problem.

Also if I’m walking against a wall and I try to jump, the player won’t jump.

Is there a working player, that’s using a rigidbody anyway. I saw several and they all had my problem.

Try creating a new physic material for the character with the friction values to zero and the friction combine set to Minimum. You can apply the material to the character’s collider. Then, when the character gets pushed up against something, it should slide down rather than get stuck with friction. Generally, it is better to control a rigidbody with forces rather than set its velocity since this is more likely to give realistic motion.