Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Collider

A collider represents the abstraction of a physics collider object on the host.

Hierarchy

  • Collider

Implements

Index

Properties

$DoNotObserve

$DoNotObserve: string[] = ['_internal']

enabled

enabled: boolean = true

geometry

geometry: Readonly<ColliderGeometry>

isTrigger

isTrigger: boolean = false

layer

layer: CollisionLayer = CollisionLayer.Default

Accessors

eventSubscriptions

  • get eventSubscriptions(): ColliderEventType[]

Methods

offCollision

offTrigger

onCollision

  • Add a collision event handler for the given collision event state.

    Parameters

    • eventType: CollisionEventType

      The type of the collision event.

    • handler: CollisionHandler

      The handler to call when a collision event with the matching collision event state is received.

    Returns void

onTrigger

  • Add a trigger event handler for the given collision event state.

    Parameters

    • eventType: TriggerEventType

      The type of the trigger event.

    • handler: TriggerHandler

      The handler to call when a trigger event with the matching collision event state is received.

    Returns void