Fixed platform hanging, determining whether the player is grounded, and some animation logic