Vortex icon indicating copy to clipboard operation
Vortex copied to clipboard

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

Open jln19 opened this issue 1 year ago • 0 comments

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

jln19 avatar Mar 20 '24 03:03 jln19