[Work in Progress]
It's an effect that I originally wanted to do for an internal project at work, but it got killed in the end. I got inspired by A Plague Tale: Innocence and wanted to give a shot at an animated swarm of rats, but with particles, thus avoiding a CPU-skinned skeletal-based crowd of actors (I don't actually know how they did it in APT, so if anyone has insights...). So here, all the "intelligent" behavior is done on the CPU (because raycasts and spatial layers) but all the animation is done on the GPU, with Vertex Animation Textures.
I have A LOT of ideas to push this further. I already started adding some more behaviors on top, like rats jumping between each other if they meet too close, and even a flamethrower event so I can burn the rats with a weapon, but I'll finish and polish everything later. I'll post everything here when the time comes.
UE4 test level. Rats have three main behaviors that overlap through velocity update: they run for the red light, they avoid obstacles (raycasting) and they avoid each other (spatial layers).