I have a unique scenario in which I am using a ParticleSystem with thousands of particles spread across the screen. When zooming and panning using the OrbitControls, I am looking to identify the particle closest to the center of the visible area.
There are two main components to this task. Firstly, it is necessary to determine the central vertex of the visible area. Subsequently, we must apply the distance formula to all particles to pinpoint the one nearest to the central vertex. I hope there is a more efficient method than the brute force approach for the second part. While locating the nearest particle can be achieved straightforwardly through brute force, I'm uncertain about how to locate the central vertex of the visible area. Can someone guide me on how to accomplish this?