• Set the lifecycle event function that will be called per frame when the collider on this GameObject is colliding with another collider.

    The given function should contain two parameters. The first parameter refers to the binded GameObject and the second parameter refers to the other GameObject that collides with the binded GameObject (both parameters are GameObject identifiers).

    For example: const myFunction = (self, other) => {...};

    • Note that for collision detaction to happen, for the two colliding GameObjects:
      • if in 3D mode, both GameObjects must applied Rigidbody by apply_rigidbody
      • if in 2D mode, at least one GameObject must applied Rigidbody by apply_rigidbody

    For more information, see

    Parameters

    • gameObjectIdentifier: GameObjectIdentifier

      The identifier for the GameObject that you want to bind the lifecycle event function on.

    • eventFunction: Function

      The lifecycle event function for handling this event.

    Returns void

Generated using TypeDoc