Hi everyone,
At the moment I’m trying to improve my PlayerMovement script. Its build up of a capsule collider, rigidbody and a script (3D, fps). For moving the character ingame I’m using the rigidbody’s velocity. Whenever my player collides with a wall, the player stops instantly moving whenever the resultant force of my keyboard input is towards the wall. I would like to adjust this to only make the player stop moving when the resultant force is perpendicular on the wall so the player will still slide along the wall when the force isn’t perpendicular.
See picture, the green arrow is the force on the player from the players input (pressing W), at the moment the player will stop when the resultant force is heading towards the wall but I want to adjust the force as the blue arrow.

Can someone help me? ![]()
Thanks in advance!