BigRookGames
Member
I made a few minor changes to the character locomotion class to carry over the move direction from the last update and added an ability to adjust the damping when on ice.
I also added a force added when standing on a slope, something like: m_MotorThrottle += m_GroundRaycastHit.normal * .02f;
This works great and as intended except for the one case where I move from a flat surface to an upward ramp. For example, when standing on a 30 degree slope, the character slides down the slope and the momentum is carried over to the flat surface as well, but as soon as the character hits an upward slope of 30 degrees, it basically stops like it hits a wall. There is a tiny bit of momentum up the slope but not much so it doesn't seem like the collision detection is just stopping it, but maybe playing a factor.
The math on the motorThrottle += i showed above looks right in debug, and the force that is added on a downward slope is the same that is taken away from an upward slope, so I would expect the distance traveled on the upward slope to roughly match the downward slope distance, minus a small damper.
Any idea what might be causing this or where I can focus my troubleshooting?
I also added a force added when standing on a slope, something like: m_MotorThrottle += m_GroundRaycastHit.normal * .02f;
This works great and as intended except for the one case where I move from a flat surface to an upward ramp. For example, when standing on a 30 degree slope, the character slides down the slope and the momentum is carried over to the flat surface as well, but as soon as the character hits an upward slope of 30 degrees, it basically stops like it hits a wall. There is a tiny bit of momentum up the slope but not much so it doesn't seem like the collision detection is just stopping it, but maybe playing a factor.
The math on the motorThrottle += i showed above looks right in debug, and the force that is added on a downward slope is the same that is taken away from an upward slope, so I would expect the distance traveled on the upward slope to roughly match the downward slope distance, minus a small damper.
Any idea what might be causing this or where I can focus my troubleshooting?