interface ICollider {
    filter?: number[];
    gameObject: IGameObject;
    isTrigger: boolean;
    membership?: number[];
    sharedMaterial?: PhysicsMaterial;
    get activeAndEnabled(): boolean;
    get destroyed(): boolean;
    get forward(): Vector3;
    get isCollider(): any;
    get isComponent(): boolean;
    get layer(): number;
    get name(): string;
    get tag(): string;
    get worldPosition(): Vector3;
    get worldQuaternion(): Quaternion;
    awake(): any;
    destroy(): any;
    earlyUpdate?(): void;
    lateUpdate?(): void;
    onAfterRender?(): void;
    onBeforeRender?(frame: null | XRFrame): void;
    onCollisionEnter?(col: Collision): any;
    onCollisionExit?(col: Collision): any;
    onCollisionStay?(col: Collision): any;
    onDestroy(): any;
    onDisable(): any;
    onEnable(): any;
    onPausedChanged?(isPaused: boolean, wasPaused: boolean): any;
    onTriggerEnter?(col: ICollider): any;
    onTriggerExit?(col: ICollider): any;
    onTriggerStay?(col: ICollider): any;
    onValidate?(property?: string): any;
    registering?(): any;
    start?(): void;
    update?(): void;
    updatePhysicsMaterial(): void;
    updateProperties(): void;
}

Hierarchy (view full)

Implemented by

Properties

filter?: number[]

The collider filter indicates what groups the collider can interact with (e.g. group 3 and 4)
An undefined array indicates that the collider can interact with all groups
Note: Make sure to call updateProperties after having changed this property
Default: undefined

gameObject: IGameObject

the object this component is attached to

isTrigger: boolean

Note: Make sure to call updatePhysicsMaterial after having changed this property

membership?: number[]

The collider membership indicates what groups the collider is part of (e.g. group 2 and 3)
An undefined array indicates that the collider is part of all groups
Note: Make sure to call updateProperties after having changed this property
Default: [0]

sharedMaterial?: PhysicsMaterial

The physics material determines how the collider interacts with other colliders (e.g. bouncyness)
Note: Make sure to call updatePhysicsMaterial after having changed this property

Accessors

  • get activeAndEnabled(): boolean
  • Returns boolean

  • get destroyed(): boolean
  • Returns boolean

  • get forward(): Vector3
  • Returns Vector3

  • get isCollider(): any
  • Returns any

  • get isComponent(): boolean
  • Returns boolean

  • get layer(): number
  • Returns number

  • get name(): string
  • Returns string

  • get tag(): string
  • Returns string

  • get worldPosition(): Vector3
  • Returns Vector3

Methods

  • called when this.context.isPaused changes or when rendering loop changes due to changing DOM element visibility e.g. when the DOM element becomes hidden or out ot view

    Parameters

    • isPaused: boolean
    • wasPaused: boolean

    Returns any

  • called for properties decorated with the

    Parameters

    • Optionalproperty: string

    Returns any

    decorator

  • experimental, called when the script is registered for the first time, this is called even if the component is not enabled.

    Returns any

  • Returns void

  • Returns void