I want to create tiny insects crawling on the floor and/or walls.
It would be great if the insects would react to player and avoid or run away from him, but if not, its ok too. Depends on the performance cost.
What would be the most modular and optimized way to make that?
Because the game is in production It HAS to be optimized and it has to be made in a way that level designers can place or determine in levels where they want insects and where they don’t want them.
Looking forward to see some ideas and/or directions and/or suggestions and/or tips!
I suggest you use particle emitter for this, either Particle-System or VFX-Graph. Spawn mesh particles on a plane and make them move randomly in local space so designers can resize & rotate this plane. Particle systems comes with plenty of tools to fake this and make it look good, although require some basic fx skills to setup. What’s more you can generate an additional textures with position normals or other custom data.
([181563-generatevisualeffectdata.zip|181563]) To implement this as VFX Graph you may want to think about it as two separate subjects:
Script that generates path data
This script can do raycasts, navmesh generation and sampling etc. - whatever you need to generate a valid path.