Jump to content

Particle System cone shape


Richard C
 Share

Recommended Posts

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

Capture4.PNG.be74000315020890f09d5fbd3b2ab526.PNG

when what I need is :

Capture5.jpg.3f2853bec2e887adf7bb1d3028ac5652.jpg

I assume I perhaps need to use

particleSystem.length = xxx

but haven't yet managed to acheive how to do it.

Thanks

Richard C

 

 

 

Link to comment
Share on other sites

Hello, this is not something you can achieve directly. BUT no worry, we've got you covered :D

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.

Link to comment
Share on other sites

@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

 

Link to comment
Share on other sites

@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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...