Game Development Reference
In-Depth Information
if (OutBox.Min.Y > BoundingBoxCoords[i].Y)
{
OutBox.Min.Y = BoundingBoxCoords[i].Y;
}
/** Detect the largest X coords */
if (OutBox.Max.X < BoundingBoxCoords[i].X)
{
OutBox.Max.X = BoundingBoxCoords[i].X;
}
/** Detect the largest Y coords */
if (OutBox.Max.Y < BoundingBoxCoords[i].Y)
{
OutBox.Max.Y = BoundingBoxCoords[i].Y;
}
}
return OutBox;
}
10. That's all there is to it! Compile the project and point your pawn towards another
pawn to see a bounding box drawn around it.
 
Search Nedrilad ::




Custom Search