Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ParticleCollisionEvent OnParticleCollision
#5
(30-01-2018, 01:06 PM)tooomg Wrote: I don't know how you setup your emitter, but my bet is that the life of some particles is over by the time you start emitting the 1414th one. So the emitter "deletes" the old one, and probably reuses their ID for the newly spawned one as it became available. So in the end, you never have more that 1414 particles at once.
About the hashset solution, it did work in my case because I was doing "one-shot" emission of all the particles and then turning off the spawner, so I wouldn't get a particle reuse some old ID. But if your emitter is continuously generating new ones, and their lifespan is not "infinite", that will probably not work as you would need a more unique ID than the particle ID which is reused.
What is the logic you are trying to achieve?

Yeah that what i am thinking too. 
The logic I try to achieve is quite simple. I shoot obi particles in one direction. On the wall, where the Obi particles hit, i spawn some "Splat" Particles (standard unity particlesystem). But Obi fluid Particles are floating on the walls, thats why I only want to take the first Collision with the wall. Since the particle shooting works like a "water gun", you can shoot any amount of Particles you would like.

My problem is, that my splats particles are not spawning any more the after the 1414th Obi particle, since the obi particles are already in my hashset. 
The reuse of the obi particles makes totally sence to me, performance wise. But I am really stuck with how I could spawn my splats at the first (and only the first) Collision with the wall.

Greets
Reply


Messages In This Thread
RE: ParticleCollisionEvent OnParticleCollision - by UTFLuke - 30-01-2018, 01:24 PM