I’m working on particle interactions in Geometry Nodes (e.g., boids-like behavior) and trying to optimize performance. Previously, I used a Repeat Zone to calculate separation, alignment, and cohesion for each particle index, but it was too slow with large numbers of particles.
I’ve started experimenting with the For Each node, hoping it would improve performance. However, I can’t get the same results as with the Repeat Zone. It seems like the node iterates in an irregular way, maybe due to how it processes each index (each index is calculated individually at the same time, instead of one after the other, as with the Repeat Zone).
If anyone has tips for using the For Each node or alternative methods for efficient particle interactions, I’d love to hear them!
Thanks!