refactor ground
more refactoring
reverse raycast