Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to rotate particles so that they point in the direction they are bursting? #12

Open
jln19 opened this issue Mar 20, 2024 · 0 comments

Comments

@jln19
Copy link

jln19 commented Mar 20, 2024

The fireworks animation is great, but I'm trying to have a custom particle burst away from the center in a flower shape. You'll notice in the screenshot here that all the particles are vertical - I want to rotate them so that the larger end is pointing away from the center of the burst. I've looked through and played with all of the parameters and can't seem to find the right one to adjust.

let explosion = VortexSystem(
				tags: ["circle"],
				spawnOccasion: .onDeath,
				position: [0.5, 0.5],
				shape: .point,
				birthRate: 1000,
				emissionLimit: 100,
				speed: 0.5,
				speedVariation: 1,
				angleRange: .degrees(360),
				acceleration: [0, 0],
				dampingFactor: 4,
				colors: .randomRamp(
					[.white, .pink, .pink],
					[.white, .blue, .blue],
					[.white, .green, .green],
					[.white, .orange, .orange],
					[.white, .cyan, .cyan]
				),
				size: 0.15,
				sizeVariation: 0.1,
				sizeMultiplierAtDeath: 0
			)

firework
Screenshot 2024-03-19 at 10 57 49 PM

What I'm trying to achieve:

Screenshot 2024-03-19 at 11 02 28 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant