Interface: MapCollider
Defined in: src/sdk/components/map/colliders/MapCollider.ts:6
A map element that supports collision detection against simple shapes.
Extended by
Properties
isMapCollider
readonlyisMapCollider:true
Defined in: src/sdk/components/map/colliders/MapCollider.ts:8
Flags this object as a MapCollider.
Methods
destroy()
destroy():
void
Defined in: src/sdk/components/map/colliders/MapCollider.ts:40
Destroys this collider.
Returns
void
getPriority()
getPriority():
number
Defined in: src/sdk/components/map/colliders/MapCollider.ts:14
Gets this collider's priority.
Returns
number
This collider's priority.
intersectsBox()
intersectsBox(
cx,cy,axisX,axisY,halfWidth,halfHeight,mapProjection):boolean
Defined in: src/sdk/components/map/colliders/MapCollider.ts:26
Tests whether this collider intersects an oriented rectangular box.
Parameters
| Parameter | Type | Description |
|---|---|---|
cx | number | The x coordinate of the center of the box. |
cy | number | The y coordinate of the center of the box. |
axisX | number | The x component of the unit vector parallel to the axis that defines the box's width. |
axisY | number | The y component of the unit vector parallel to the axis that defines the box's width. |
halfWidth | number | The half width of the box. |
halfHeight | number | The half height of the box. |
mapProjection | MapProjection | - |
Returns
boolean
Whether this collider intersects the specified oriented rectangular box.
intersectsCircle()
intersectsCircle(
cx,cy,radius,mapProjection):boolean
Defined in: src/sdk/components/map/colliders/MapCollider.ts:35
Tests whether this collider intersects a circle.
Parameters
| Parameter | Type | Description |
|---|---|---|
cx | number | The x coordinate of the center of the circle. |
cy | number | The y coordinate of the center of the circle. |
radius | number | The radius of the circle. |
mapProjection | MapProjection | - |
Returns
boolean
Whether this collider intersects the specified circle.