I am trying to implement a rat swarm system (from A Plague Tale) into my little concept game… thing. I followed a tutorial or two and implemented the rats themselves, but I quickly ran into a problem: How do I make them evade light in the most simple way possible? I figured out if I add a point attractor to the system and set the strength to a negative value (-100), they will be effectively pushed away. So this brings me to the main question: How do I do this for each light source in the scene? I was thinking I could make an array containing said light sources and having the system read it, but I don’t know how to carry this out, nor if it is even possible. How can I do it in the simplest, cleanest way possible? (i.e., no crazy or excessive scripts)
Also, sorry if this isn’t the correct category for this. I didn’t know where to put it