Intersection Events

An intersection event is an event that is fired as a result of a Z.Raycaster node intersecting with a Z.Object node that both:

  1. includes the same tag value as the Raycaster node's colliderTag value, and
  2. is within the colliderLimit of the Raycaster node.

There are six intersection events that are split between the Raycaster node itself, and the intersecting Z.Object node. They are as follows:

Event Node Description
intersectionenter Z.Raycaster When the Raycaster first intersects with an object.
intersections Z.Raycaster Once a frame with data for every object currently intersected by the Raycaster.
intersectionleave Z.Raycaster When the Raycaster is no longer intersecting with an object.
intersectionenter Z.Object When the object is first intersected by a Raycaster.
intersection Z.Object Once a frame for each Raycaster that the object is intersected by.
intersectionleave Z.Object When the object is no longer being intersected by a Raycaster.

Both intersectionenter events, along with Z.Raycaster's intersections, and Z.Object's intersection pass an IntersectionEvent argument to attached handler functions, providing further information on the intersection.

zapcode branded_zapcode i