Type alias RayOptions

RayOptions: {
    callback?: ((result) => void);
    checkCollisionResponse?: boolean;
    collisionGroup?: number;
    collisionMask?: number;
    from?: Vec2;
    mode?: typeof CLOSEST | typeof ANY | typeof ALL;
    skipBackfaces?: boolean;
    to?: Vec2;
}

Type declaration

  • Optional callback?: ((result) => void)
      • (result): void
      • Current, user-provided result callback. Will be used if mode is Ray.ALL.

        Parameters

        Returns void

  • Optional checkCollisionResponse?: boolean

    Set to true if you want the Ray to take .collisionResponse flags into account on bodies and shapes.

  • Optional collisionGroup?: number

    Collision group

  • Optional collisionMask?: number

    Collision mask

  • Optional from?: Vec2

    Ray start point.

  • Optional mode?: typeof CLOSEST | typeof ANY | typeof ALL

    The intersection mode.

  • Optional skipBackfaces?: boolean

    If set to true, the ray skips any hits with normal.dot(rayDirection) < 0.

  • Optional to?: Vec2

    Ray end point.