pixijs / particle-emitter

A particle system for PixiJS
http://pixijs.io/particle-emitter/docs
MIT License
793 stars 125 forks source link

Reverse Spawn Direction? #71

Closed gregmax17 closed 6 years ago

gregmax17 commented 6 years ago

I'm trying to mimic the space star field effect, but instead of it looking like you are moving forward I want it to appear like you are moving backwards. I can get the classic space star field warp speed effect working, but I can't figure out what value(s) to change to get them to spawn/transition to the center so it appears as if you are moving backwards in space.

Any ideas on how to do this?

andrewstart commented 6 years ago

Ring type emitter mode with Start Rotation min & max of 180 degrees. You'll need to tweak your particle speed/lifetime/alpha so that they disappear as close to the center as you want but not go past the center ever. You'll probably want to have a slower end speed than start speed.

gregmax17 commented 6 years ago

Thank you for the reply.

I'm trying those 2 changes, changing the type emitter to Ring, and setting the Start Rotation min and max values both to be 180, but the particles still spawn from the center and move outwards/towards the edge, forming a ring/circle. I need to get the particles spawning on the outside of the ring and moving towards the center.

Are there other settings that I'm overlooking? Anyway you can quickly send a screen shot of what you have please?

andrewstart commented 6 years ago

For the Ring settings, change the min/max emission radius to something large - 200 is good for an example, although you would want something starting outside your view area. ring_settings

gregmax17 commented 6 years ago

OH Nice! Thank you very much!