Polygon
Introduction
using FlatRedBall.Math.Geometry;using Point = FlatRedBall.Math.Geometry.Point;Example: Creating a Rectangle Polygon in Code
// Parameters are "ScaleX" and "ScaleY" which is the distance from
// center to edge. Therefore, to make a 32x32 rectangle, we'd use
// 16 for each dimension:
Polygon rectangle = Polygon.CreateRectangle(32/2, 32/2);
// To have the Polygon drawn and managed, add it to the ShapeManager
ShapeManager.AddPolygon(rectangle);Example: Creating a Polygon From Points in Code

Clockwise Points

Polygon Collision
Efficiency of Polygon Collision
SimulateCollideAgainstMove
Last updated
Was this helpful?