tbgeorge Posted July 18, 2016 Share Posted July 18, 2016 Hi, so I have this scene and I've tried to hack together a way to change the angle of each particle though there is still one frame occasionally that it shows up at angle = 0. Here's a link to my playground scene: http://www.babylonjs-playground.com/#1PO0WU#10 Would it be possible to set a starting angle for particles to come out of the emitter at? Such as: particleSystem.startingAngle = #; Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 19, 2016 Share Posted July 19, 2016 Hiya @tbgeorge, good to see you again. Um... BJS particle systems have some properties that take care of that FOR you, and you are free to adjust them. Take a look here... http://playground.babylonjs.com/#206JUO#10 See all the .25 values in lines 62/63? Those are used to narrow or widen the dispersion width of the particles. Decrease those values to set precise particle directions... or increase to fan-out the emitting. Also take a look at lines 35/36. This could be considered the SIZE of the emitter. In this particle demo, we are using a vector3 as the emitter, and not a mesh (line 34). Notice it has its Y axis set to 1... but you could set this to 0,0,0, too. The directions in lines 62/63 are the boss, here. Or are they? Let's look at another version: http://playground.babylonjs.com/#206JUO#11 Here, I set line 34 for a -5 on X. It moved the particle emissions... sideways. Yet they still go upward... because of the value 8 in the Y values of lines 62/63. I also increased the values in the emitBox settings of lines 35/36, and that is why the particles launch from a "wide" fountain. Take some time, examine this playground demo, do some playing. Make edits, press RUN often, SAVE as often as you like, you can't hurt/overwrite anything. Soon you'll be a particles expert. If you have more questions or problems, we're here to help. Just holler. Hope you're well. Party on! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.