Skip to content

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

@jln19

Description

@jln19

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions