I'm trying to figure out how to handle collisions with a player trying to move over sloped terrain. For example, consider if a player is at the bottom of a half-pipe and wants to go left:
- At first the player is on the flat and can go directly left
- At some point the player starts going up a slope, and so needs to go up and left in order to remain on top of the terrain
How should I handle this?
- Should try and move the player directly left and see if they have collided with terrain - if they have then work out if I should nudge the players position?
- Should I try and work out what the terrain to the players left looks like, and determine in advance what height the player should be placed at?