added the assumption that floor and ceil normals are the gravity