0
\$\begingroup\$

I'm trying to do an experiment where the user creates particles when they touch the screen, and then the particles just stay in place, only dying in collision. I'm wondering if it would be possible to do this in a way where the particles have an infinite lifespan? I feel like I've done this in Unity before, but never in SceneKit.

\$\endgroup\$
  • 3
    \$\begingroup\$ Unfortunately not, the universe is scheduled to end in approximately 5 billion years. \$\endgroup\$ – MichaelHouse Aug 9 '17 at 20:55
  • \$\begingroup\$ Well, there go all my singularity dreams 😂 \$\endgroup\$ – Tam Hartman Aug 9 '17 at 20:56
  • \$\begingroup\$ Can you just use this property and set it to something like 5 billion years? developer.apple.com/documentation/scenekit/scnparticlesystem/… \$\endgroup\$ – MichaelHouse Aug 9 '17 at 20:59
  • \$\begingroup\$ I suppose so, but shouldn't there be some option to just turn particle death off? You can remove particle death on collision \$\endgroup\$ – Tam Hartman Aug 9 '17 at 21:02
  • \$\begingroup\$ Might a value of -1 work? I've seen some engines use that to represent a lifespan of infinity. Or maybe CGFloat.infinity. \$\endgroup\$ – Coburn Aug 9 '17 at 21:29
1
\$\begingroup\$

There is currently no way to completely eliminate particle death, but you can set the particle life span to an outrageously high number (20,000 seconds is pretty close to the upper limit of the safe zone) well beyond what would be expected for user interaction on an iOS game.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.