Dad72 Posted September 22, 2017 Share Posted September 22, 2017 Hello, I have several questions about SPS @jerome. I would like to build a solid particle editor. Perhaps I am wrong, but I feel that there are some possibilities missing. - The particle.direction2 and particle.direction2 of the particles. (is it particle.velocity ???) - their lifespan (particle.minLifeTime, particle.maxLifeTime) - something like particle.manualEmitCount - their colors just before it dies particle.colorDead - minEmitPower and minEmitPower - SPS.Stop() or SPS.Pause() and SPS.Play() I would like to be able to redo as for the 2d particle but using Solid Particle (SPS) Thank you for your help. Quote Link to comment Share on other sites More sharing options...
jerome Posted September 22, 2017 Share Posted September 22, 2017 The SPS is behavior agnostic in purpose. So anyone can implement his own custom behavior and super set the particle object with any wanted property. Stop, Pause, Play() would just a way to call or not setParticles() in the render loop. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 22, 2017 Author Share Posted September 22, 2017 I'm not sure how to add custom properties. Do you have an example with particle.direction1 and particle.direction2? It's just to understand how it works. Thank you Quote Link to comment Share on other sites More sharing options...
jerome Posted September 22, 2017 Share Posted September 22, 2017 SolidParticle.prototype.direction1 = BABYLON.Vector3.Zero(); should do the job ... Then each newly created particle object is set with a Vector3 as direction1 property. If you implement an emiter (not existing with the SPS in purpose), you can then set each particle direction1 the way you want. To answer the first question : the velocity is a Vector3 designed to store the particle velocity, meaning its direction scaled by its speed. This can be used to move the particle this way : position.addInPlace( velocity ) as we can imagine that the user would want to animate the particles... but it can be used for any other usage if you want. The SPS has no default behavior by design. It can be used to animate particles or to build aggregated immobile objects also or to simply build a complex mesh and to access its subparts. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 22, 2017 Author Share Posted September 22, 2017 Okay, I'll try this. Thank you Jerome. Quote Link to comment Share on other sites More sharing options...
jerome Posted September 22, 2017 Share Posted September 22, 2017 de nada 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.