raycastParticle method

void raycastParticle(
  1. ParticleRaycastCallback particleCallback,
  2. Vector2 point1,
  3. Vector2 point2
)

Ray-cast the world for all particles in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points.

point1 is the ray's starting point point2 is the ray's ending point

Implementation

void raycastParticle(
  ParticleRaycastCallback particleCallback,
  Vector2 point1,
  Vector2 point2,
) {
  particleSystem.raycast(particleCallback, point1, point2);
}