PolygonColliderComponent
Declaration
public class Strawberry.Components.Physics.PolygonColliderComponent
A collider with an arbitrary polygon shape
Inherits: Strawberry.Components.Physics.ColliderComponent
Properties
Fixture override
The underlying fixture of the collider
Fixture Fixture { get }
Offset
The offset of the collider relative to the body's position, in pixels.
Vector2 Offset { get set }
Methods
SetVertices
Sets the vertices of the polygon collider in pixels.
void SetVertices(Vector2[] positions)
Parameters:
| Name | Type | Description |
|---|---|---|
positions |
Strawberry.Math.Vector2[] |
The vertex positions in pixels. |
CreateFixture protected override
void CreateFixture(Body body)
Parameters:
| Name | Type | Description |
|---|---|---|
body |
tainicom.Aether.Physics2D.Dynamics.Body |