Readonly
idPixel offset relative to a collider's body transform position.
Get the axis aligned bounding box for the polygon collider in world coordinates
Get the axis aligned bounding box for the polygon collider in local coordinates
Points in the polygon in order around the perimeter in local coordinates. These are relative from the body transform position. Excalibur stores these in counter-clockwise order
Points in the polygon in order around the perimeter in local coordinates. These are relative from the body transform position. Excalibur stores these in counter-clockwise order
Returns a clone of this ConvexPolygon, not associated with any collider
Returns a collision contact if the 2 colliders collide, otherwise collide will return null.
Given a direction vector find the local space side that is most in that direction
Given a direction vector find the world space side that is most in that direction
Finds the closes face to the point using perpendicular distance
point to test against polygon
Returns the closest line between the surfaces this collider and another
Get the moment of inertia for an arbitrary polygon https://en.wikipedia.org/wiki/List_of_moments_of_inertia
Returns the local coordinate space sides
Gets the sides of the polygon in world space
Returns if the polygon collider is convex, Excalibur does not handle non-convex collision shapes. Call Polygon.triangulate to generate a CompositeCollider from this non-convex shape
Project the edges of the polygon along a specified axis
Tessellates the polygon into a triangle fan as a CompositeCollider of triangle polygons
Triangulate the polygon collider using the "Ear Clipping" algorithm. Returns a new CompositeCollider made up of smaller triangles.
Polygon collider for detecting collisions