Change angle of player when changing slope angles
In my 2d platformer, my player moves up and down slopes by finding the angle of the slope they are standing on and then calculating new x and y velocities using sin and cos (which works perfectly). I did so that I can easily get the physics shown on the top slope in the image. However, it means that when Im going up (or down for that matter) a slope and transitioning onto a new slope with a shallower (or steeper) gradient, I continue moving at the old angle direction, overshooting the new slope completely (as to be expected). The bottom slope in the image demonstrates this, green what I want and red what I have. I've tried many different methods to get around this such as sucking the player to the new slope or increasing the gravity substantially at the intersection but none of them work very well. Any help? :)
Your answer
Follow this Question
Related Questions
Raycast Reflection 2D 1 Answer
2D RigidBody slightly penetrates objects causing a bounce effect. 3 Answers
Having a couple of problems regarding 2D Movement. 1 Answer
Best way to generate meshes based on algebraic functions? 0 Answers
2D Physics movement system is creating unexplained random variations. 0 Answers