getGravityDirection to integer for less if statement hell