OwenTheBell / RunRoom

0 stars 0 forks source link

Player needs to be caught on jumps they are just barely not going to make #34

Closed OwenTheBell closed 10 months ago

OwenTheBell commented 10 months ago

If the player barely makes a jump there is this awkward moment where the lower curve of the collider hits the edge and the player is bumped up onto the platform. This causes an jerk in the camera and immediately kills all their forward momentum.

The obvious solution is to cheat it and give the player the jump, but how?

OwenTheBell commented 10 months ago

First idea is to place a platform below the player's feet to catch them if they are not going to make the leap.

A line trace down from the front of the player's collider and another from the center of the collider tells us if they are going to miss a platform or not. The invisible platform can then be positioned directly below them to catch them.