UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SKEmitterNode follow path - but offset?

Forums > Swift

@LilaQ  

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

2      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

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.