Added ApplyMovement function for platforming.