Pete wrote:Hi there,
I'm trying to get a group of particles to check if there are any particles in front of them and I'm struggling to figure out how I could get this working.
The closest I can figure is "Get Nearest Points" but I only want to check if there are points in a certain direction.
Also Raycast wont work as it's looking for geometry.
Any ideas where i could start with this??
Thanks
Pete
Get neighboring particles, get their pointpositions, draw vectors from the current particle's position to the neighbors' positions, and check the angle between those vectors and the current particle's velocity vector. The neighbors that return 0 are directly in front of the current particle (or you can check if the angle<=x, where x is the angle of a "cone", in case you want a broader search area).
I believe it can be refined further, but that should be a good start.