Any way to "cache" a particle system?
-
Can I place a particle system in the scene, somehow, activate it 'off camera' so that it's done a run through and fully created itself, then... when I need it, move it to where it's needed and make it run a cycle of itself?
This way, usually, results in a lot less overhead and stops the little glitch that occurs when you build a particle system that spits a lot of particles on each pulse. Mostly. But I can't see (immediately) how to do this within hyperPad.
-
Unfortunately not. But if you disable the start particles behaviour, it will stop the particles, and when its ready to use, you can use the enable behaviour to start it again.
Another option is if you use a particle object in your scene, you can use the disable object behaviour which will hide the particles, and use the enable object behaviour which will show them again.
-
@Hamed said in Any way to "cache" a particle system?:
But if you disable the start particles behaviour, it will stop the particles, and when its ready to use, you can use the enable behaviour to start it again.
There is a bug with this:
Every subsequent effort to start the particles does so initially from near the first position in world space. The particle then moves to the player where it should be, but leaves some noticeable remnants of its emission at (or quite near) that initial location.
-
Could it be that you're restarting the particles too quickly?
-
@Hamed What do you mean by "too quickly"?
-
How soon after disabling it are you showing it again?
-
@Hamed This doesn't have an impact. It can be one second later or 20 seconds after disabling it. I have 3 particles attached to the hero, if events trigger their start, I can see them all starting at about the position the hero begins the level, then disappearing briefly before reappearing where they should be, with the hero.
-
Sounds like a bug. I'll add it to the list. Thanks.
-
@Hamed I've just attempted to drop a particle system into the scene (the other approach) and then weld it to the hero.
I've made sure to make it a physics object, passable, with no gravity and no friction. This has another weird bug, in that the particle system binds the hero to the point in space he's started at, as though the particle system is a static physics object that's holding the hero in place.
I'd consider this a double bug, because "weld to..." should be making the first object the slave of the second object, not the other way around. The first bug being that the particle system hasn't become anything other than a static physics object, despite being set to physics body.
-
@Hamed Oddly, I've found how they're not exactly in the same spot every time... just right around the start point of the level... they're paying attention to the rotation of the hero. So all 3 particle systems are somewhere in the proximity of the starting point, relative to some weird distance that shouldn't be there (they should start right where the hero is) and then rotating via the hero as their anchor centre around him, based on whatever distance they succumbed to from the hero at start.
This might mean they are some kind of physics object that's falling before the start. Maybe. I don't know.