Modified terrainCollision