Richard C Posted March 13, 2017 Share Posted March 13, 2017 Could someone please point me in the direction to achieve the following shape using particles:- particleSystem.direction1 = new BABYLON.Vector3(-0, 0, 0); particleSystem.direction2 = new BABYLON.Vector3(7, 7, -7); gives me a cube / rectangle when what I need is : I assume I perhaps need to use particleSystem.length = xxx but haven't yet managed to acheive how to do it. Thanks Richard C Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 13, 2017 Share Posted March 13, 2017 Hello, this is not something you can achieve directly. BUT no worry, we've got you covered You can control the behavior of every particle with the custom update functions: http://doc.babylonjs.com/tutorials/particles#custom-functions In your case I suggest creating an update function where you check the distance between the particle and the emitter. Otho 1 Quote Link to comment Share on other sites More sharing options...
Richard C Posted March 14, 2017 Author Share Posted March 14, 2017 @Deltakosh I've been trying the update function but run into problem. How do you measure the distance between particle and the axis from which it is emitted. It is not right to measure from the emitter. http://www.babylonjs-playground.com/#1WUQ1S#20 For your info - I am trying to simulate a submersible descending to the seabed and the subsequent 'sand cloud' that would result. I current have 4 emitters (as you can see in the PG) in each corner of the sub. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 14, 2017 Share Posted March 14, 2017 Yep but you are not using the update function in your pg In your update you can simply save the initial position of the particle at first call and then use it on following calls Quote Link to comment Share on other sites More sharing options...
gryff Posted March 15, 2017 Share Posted March 15, 2017 @Richard C:How about this for a "cone" shape of particles: Simple Particles Cone The trick are the two lines 55 and 56 - they define the "spread" in two directions from a much smaller emit box in lines 29 and 30 Play with the numbers in 55/56 and 29/30. I guess it is more quadrahedral than a genuine cone - but is that noticeable ? cheers gryff 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.