WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

SKEmitterNode follow path - but offset?

Forums > Swift


Hey guys,

I currently have some code where my SKEmitterNode follows a given path, infinitely, which works very well. But now I would like to have 3 of those Emitters following this path, offset.

I could just wait for time X and then add them, but I would like to have all 3 emitters visible from the start. I know about the advanceSimulationTime(sec:) for ParticleSystem - I would need something like that for the follow.

Also I already thought about creating 3 paths, but that could maybe end up messy (I'm drawing a simple CGPath(roundedRect:CGRect) right now, I guess I would probably have to manually draw this to come up with a manual entry point.

Does anyone have any idea on how to achieve this (more elegantly)?

Thanks in advance LilaQ


Hacking with Swift is sponsored by Emerge

SPONSORED Optimize your app’s startup time, binary size, and overall performance using Emerge’s advanced app optimization and monitoring tools. Reliably measure app size, speed up your app's startup time with Emerge's Launch Booster, and much more. Emerge is actively used by many of the top mobile development teams in the world.

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.