make sure gravity is applied when player walks off platform

This commit is contained in:
2024-12-14 08:11:23 +00:00
parent 1901043535
commit 34884b1b50
2 changed files with 6 additions and 2 deletions

View File

@@ -69,7 +69,10 @@ struct
val collisions = QuadTree.getCollisionSides
(desiredX, y, size, size, 0, 0, 1920, 1080, 0, Wall.tree)
in
checkWalls (yAxis, xAxis, desiredX, y, health, collisions)
(* using default yAxis of FALLING when on ground
* ensures that gravity is applied
* when player walks off from platform *)
checkWalls (FALLING, xAxis, desiredX, y, health, collisions)
end
| FALLING =>
let