// find the ground relative to this camera pos Point3D worldPos; worldPos = m_FixedPoint; Stuff::Normal3D normal; Stuff::Line3D line; CollisionQuery query(&line, &normal, CanBeWalkedOnFlag, this); line.m_length = 150.0f; line.m_direction = Vector3D(0.0f, -1.0f, 0.0f); line.m_origin = worldPos; // push well up above the ground before looking for collision line.m_origin.y += 50.0f; Adept::Entity *entityHit; Check_Object(CollisionGrid::Instance); entityHit = CollisionGrid::Instance->ProjectLine(&query); float groundOffsetY = 0.0f; if(entityHit != NULL) { line.FindEnd(&worldPos); groundOffsetY = (worldPos.y + offsetY); } // distance our camera from the ground Point3D tempPnt1, tempPnt2; tempPnt1 = m_FixedPoint; tempPnt1.y = 0.0f; tempPnt2.AddScaled(tempPnt1, Vector3D::Up, groundOffsetY);