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:
- includes the same
tagvalue as the Raycaster node's
- is within the
colliderLimitof 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:
|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.|
intersectionenterevents, along with Z.Raycaster's
intersections, and Z.Object's
intersectionpass an IntersectionEvent argument to attached handler functions, providing further information on the intersection.