Represents a collider component for a rectangular box.
More...
|
| List< Vector2 > | GetWorldPoints (Vector2 position, Vector2 scale, float angle) |
| | Gets the corner points of the collider in world space.
|
| |
| bool | SATCollisionDetection (List< Vector2 > points1, List< Vector2 > points2) |
| | Performs Separating Axis Theorem (SAT) collision detection.
|
| |
| List< Vector2 > | GetAxes (List< Vector2 > points) |
| | Calculates the axes of the collider.
|
| |
| List< Vector2 > | SATContactPoints (List< Vector2 > points1, List< Vector2 > points2) |
| | Calculates the contact points using the Separating Axis Theorem (SAT).
|
| |
|
| List< Vector2 > | axes = new List<Vector2>() |
| |
|
| Entity | entity [get, private set] |
| | The entity to which this component is attached.
|
| |
| Transform | transform [get] |
| | The transform of the entity to which this component is attached.
|
| |
| bool | Enabled = true [get, set] |
| | Determines whether the component is enabled.
|
| |
Represents a collider component for a rectangular box.
◆ Awake()
| override void WoopWoop.BoxCollider.Awake |
( |
| ) |
|
|
virtual |
◆ GetAxes()
| List< Vector2 > WoopWoop.BoxCollider.GetAxes |
( |
List< Vector2 > | points | ) |
|
|
private |
Calculates the axes of the collider.
- Parameters
-
| points | Corner points of the collider. |
- Returns
- List of axes.
◆ GetCollisionData()
Gets collision data with a given entity.
- Parameters
-
| other | The other collider to check against. |
- Returns
- Collision data if colliding, otherwise null.
◆ GetWorldExtents()
| Vector2 WoopWoop.BoxCollider.GetWorldExtents |
( |
| ) |
|
Gets the extents of the collider in world space.
- Returns
- Extents vector.
◆ GetWorldPoints()
| List< Vector2 > WoopWoop.BoxCollider.GetWorldPoints |
( |
Vector2 | position, |
|
|
Vector2 | scale, |
|
|
float | angle ) |
|
private |
Gets the corner points of the collider in world space.
- Parameters
-
| position | The position of the collider. |
| scale | The scale of the collider. |
| angle | The angle of rotation of the collider (in radians). |
- Returns
- List of corner points in world space.
◆ IsCollidingWith()
| override bool WoopWoop.BoxCollider.IsCollidingWith |
( |
Collider | other | ) |
|
|
virtual |
Checks if the collider is colliding with another collider.
- Parameters
-
| other | The other collider to check against. |
- Returns
- True if colliding, otherwise false.
Reimplemented from WoopWoop.Collider.
◆ OnDrawGizmo()
| override void WoopWoop.BoxCollider.OnDrawGizmo |
( |
| ) |
|
|
virtual |
◆ SATCollisionDetection()
| bool WoopWoop.BoxCollider.SATCollisionDetection |
( |
List< Vector2 > | points1, |
|
|
List< Vector2 > | points2 ) |
|
private |
Performs Separating Axis Theorem (SAT) collision detection.
- Parameters
-
| points1 | Corner points of the first collider. |
| points2 | Corner points of the second collider. |
- Returns
- True if colliding, otherwise false.
◆ SATContactPoints()
| List< Vector2 > WoopWoop.BoxCollider.SATContactPoints |
( |
List< Vector2 > | points1, |
|
|
List< Vector2 > | points2 ) |
|
private |
Calculates the contact points using the Separating Axis Theorem (SAT).
- Parameters
-
| points1 | The points of the first collider. |
| points2 | The points of the second collider. |
- Returns
- A list of contact points.
◆ axes
| List<Vector2> WoopWoop.BoxCollider.axes = new List<Vector2>() |
|
private |
The documentation for this class was generated from the following file: