abstractCollider
Hierarchy
Implements
Index
Constructors
constructor
Returns Collider
Properties
publiccomposite
Composite collider if any this collider is attached to
WARNING do not tamper with this property
publicevents
publicreadonlyid
offset
Pixel offset of the collision collider relative to the collider, by default (0, 0) meaning the collider is positioned on top of the collider.
publicowner
Accessors
abstractaxes
Return the axes of this particular collider
Returns Vector[]
abstractbounds
Return the axis-aligned bounding box of the collision collider in world coordinates
Returns BoundingBox
abstractcenter
The center point of the collision collider, for example if the collider is a circle it would be the center.
Returns Vector
abstractlocalBounds
Return the axis-aligned bounding box of the collision collider in local coordinates
Returns BoundingBox
abstractworldPos
Position of the collision collider in world coordinates
Returns Vector
Methods
abstractclone
Returns Collider
abstractcollide
Parameters
collider: Collider
Returns CollisionContact[]
abstractcontains
Return wether the collider contains a point inclusive to it's border
Parameters
point: Vector
Returns boolean
abstractdebug
Parameters
ex: ExcaliburGraphicsContext
color: Color
optionaloptions: { lineWidth: number; pointSize: number }
lineWidth: number
pointSize: number
Returns void
abstractgetClosestLineBetween
Returns the closest line between the surfaces this collider and another
Parameters
collider: Collider
Returns LineSegment
abstractgetFurthestPoint
abstractgetInertia
Parameters
mass: number
Returns number
abstractproject
Create a projection of this collider along an axis. Think of this as casting a "shadow" along an axis
Parameters
axis: Vector
Returns Projection
abstractrayCast
Return the point on the border of the collision collider that intersects with a ray (if any).
Parameters
ray: Ray
optionalmax: number
Returns RayCastHit
publictouching
abstractupdate
Updates collider world space geometry
Parameters
transform: Transform
Returns void
A collision collider specifies the geometry that can detect when other collision colliders intersect for the purposes of colliding 2 objects in excalibur.