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:
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: