Right now a particle emitter shoots all particles out of its exact coordinate.
How would I go about making the particles look like they spawn anywhere within some radius around the coordinate.
I'm trying to create some kind of comet effect around a sprite, where there's a halo of particles surrounding the sprite with the ones behind trailing off. All my experiments end up with the particles either going too fast, going too far, or traveling in a cone behind the sprite with no particles in front.
Particle spawn radius
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Particle spawn radius
I think that can not be changed.Right now a particle emitter shoots all particles out of its exact coordinate.
You could move around the particle emiter using ParticleSystem:setPosition (x, y)
ie to spawn in a a=100 square around the center:
ParticleSystem:setPosition (x+math.random(-50,50) , y+math.random(-50,50))
or to spawn in a ring with r=100 around the center:
local angle = math.random (0, 3.14 * 2)
local r = 100
ParticleSystem:setPosition (x + sin (angle) *r, y +cos (angle) *r)
Re: Particle spawn radius
So instead of having an emitter in the centre, I could have a ring of emitters around the centre at the desired radius. I guess that could work.
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Denver, CO
- Contact:
Re: Particle spawn radius
I believe he was actually suggesting you move the emitter around randomly.VideroBoy wrote:So instead of having an emitter in the centre, I could have a ring of emitters around the centre at the desired radius. I guess that could work.
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Particle spawn radius
Think of the emitter like a water hose. You can change the hose's angle and flow etc, but to have multiple starting locations you'll need to shake the hose around.
Kurosuke needs beta testers
Re: Particle spawn radius
This is what I ended up implementing. It's good enough.TechnoCat wrote:I believe he was actually suggesting you move the emitter around randomly.
Who is online
Users browsing this forum: Google [Bot] and 237 guests