I’m currently working on a dungeon crawler and I want to implement nice lighting. I followed this forum topic and this video, and I successfully set up a lighting system based on writing to two textures and then blending them.
It’s cool and works great for lamps or flashlights. However, torches may emit small particles that float upward. I want not only the particles themselves, but also for them to emit light. The only solution that comes to mind is to create one emitter with a standard material for the particles, and another emitter with a light material for the glow. Unfortunately, they aren’t in sync, so the particles and their light can move in different directions.
If there were a way to set the particle seed or otherwise synchronize the two emitters, that would be great. Is this possible somehow? Or maybe some of you have a better solution?
We’ve talked about ways to control the seed in various ways. Currently a pfx always has the same seed, but there is no way for the developer to set it:
There’s a feature request to make it random on each play, but no request to do the opposite and let the developer set it.
Thank you for clarifying that my approach isn’t quite possible at the moment. Given the limited number of torches and entities in general, I might just spawn some game objects with two sprites and manage their trajectories via torch script.
Is that still true? I experimented with multiple torches, and each one seems to spawn particles differently; both between instances and across different launches of the game, as well as between multiple cycles of particlefx.play() and particlefx.stop() calls. Each time, the first particle is different for each torch.
It seems like its already fixed here (or I get it wrong):