CircleCollider
Hierarchy
- Collider
- CircleCollider
Index
Constructors
constructor
Parameters
options: CircleColliderOptions
Returns CircleCollider
Properties
publiccomposite
Composite collider if any this collider is attached to
WARNING do not tamper with this property
publicevents
publicreadonlyid
publicoffset
Position of the circle relative to the collider, by default (0, 0).
publicowner
Accessors
publicaxes
Get axis not implemented on circles, since there are infinite axis in a circle
Returns Vector[]
publicbounds
Get the axis aligned bounding box for the circle collider in world coordinates
Returns BoundingBox
publiccenter
Get the center of the collider in world coordinates
Returns Vector
publiclocalBounds
Get the axis aligned bounding box for the circle collider in local coordinates
Returns BoundingBox
publicradius
Get the radius of the circle
Returns number
Set the radius of the circle
Parameters
val: number
Returns void
publicworldPos
Position of the collision collider in world coordinates
Returns Vector
Methods
publicclone
Returns a clone of this shape, not associated with any collider
Returns CircleCollider
publiccollide
Parameters
collider: Collider
Returns CollisionContact[]
publiccontains
Tests if a point is contained in this collider
Parameters
point: Vector
Returns boolean
publicdebug
Parameters
ex: ExcaliburGraphicsContext
color: Color
optionaloptions: { lineWidth: number }
Returns void
publicgetClosestLineBetween
Returns the closest line between the surfaces this collider and another
Parameters
shape: Collider
Returns LineSegment
publicgetFurthestLocalPoint
publicgetFurthestPoint
publicgetInertia
Returns the moment of inertia of a circle given it's mass https://en.wikipedia.org/wiki/List_of_moments_of_inertia
Parameters
mass: number
Returns number
publicproject
Project the circle along a specified axis
Parameters
axis: Vector
Returns Projection
publicrayCast
Casts a ray at the Circle collider and returns the nearest point of collision
Parameters
ray: Ray
max: number = Infinity
Returns RayCastHit
publictouching
Returns a boolean indicating whether this body collided with or was in stationary contact with the body of the other [[Collider]]
Parameters
other: Collider
Returns boolean
publicupdate
Updates collider world space geometry
Parameters
transform: Transform
Returns void
This is a circle collider for the excalibur rigid body physics simulation