DynamicTreeCollisionProcessor
Implements
Index
Constructors
constructor
Parameters
_config: Required<{ arcade?: Required<{ contactSolveBias?: ContactSolveBias }>; bodies?: Required<{ canSleepByDefault?: boolean; defaultMass?: number; sleepBias?: number; sleepEpsilon?: number; wakeThreshold?: number }>; colliders?: Required<{ compositeStrategy?: separate | together }>; continuous?: Required<{ checkForFastBodies?: boolean; disableMinimumSpeedForFastBody?: boolean; surfaceEpsilon?: number }>; dynamicTree?: Required<{ boundsPadding?: number; velocityMultiplier?: number }>; enabled?: boolean; gravity?: Vector; realistic?: Required<{ positionIterations?: number; slop?: number; steeringFactor?: number; velocityIterations?: number; warmStart?: boolean }>; solver?: SolverStrategy; sparseHashGrid?: SparseHashGridConfig; spatialPartition?: SpatialPartitionStrategy; substep?: number }>
Returns DynamicTreeCollisionProcessor
Methods
publicbroadphase
Detects potential collision pairs in a broadphase approach with the dynamic AABB tree strategy
Parameters
targets: Collider[]
elapsedMs: number
optionalstats: FrameStats
Returns Pair[]
publicdebug
Draw any debug information
Parameters
Returns void
publicgetColliders
Get all tracked colliders
Returns readonly Collider[]
publicnarrowphase
Applies narrow phase on collision pairs to find actual area intersections Adds actual colliding pairs to stats' Frame data
Parameters
pairs: Pair[]
optionalstats: FrameStats
Returns CollisionContact[]
publicquery
publicrayCast
Parameters
ray: Ray
optionaloptions: RayCastOptions
Returns RayCastHit[]
publictrack
Tracks a physics body for collisions
Parameters
target: Collider
Returns void
publicuntrack
Untracks a physics body
Parameters
target: Collider
Returns void
publicupdate
Update the dynamic tree positions
Parameters
targets: Collider[]
Returns number
Responsible for performing the collision broadphase (locating potential collisions) and the narrowphase (actual collision contacts)