Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Fluid Setup - Beginner Question
#4
(04-01-2018, 12:43 PM)hmhmhm Wrote: Thank you Jose, for the quick and detailed reply. I had indeed not set the Mode to 2D. That immediately removed the problem of the particles leaving the 2D plane. I then checked the phases and they were 1 for the emitter and 0 for the game object by default. So all I did was change the mode to 2D, but that still leaves me with the problem of particles entering the object:

[Image: Z0vn9Lk.png]

This what the inspector looks like for the emitter:

[Image: dQOhqlw.png]

Is there anything else I am doing wrong?

Thank you for the hint regarding 'extending the ObiEmitterShape class'. Is there a tutorial or an example of this available for me to look at? I'm aiming for a triangle shape.

Once again thank you!

Hi!

Your emitter scale is negative. That means it is turned "inside out", so particles will collide with its inner walls. Set the Y scale to 0.1 instead and it will work as you expect.

Extending classes is a basic C# skill, so I assume you already know how to do that. The details on what to do when extending it are:

-Set samplingMethod to FILL in the Awake() method.
-Override the two abstract methods of the base class (SupportsAllSamplingMethods() and GenerateDistribution()).
-SupportsAllSamplingMethods should return false.
-In GenerateDistribution, simply fill the distribution List<> with distribution points. These are the places in the shape where the particles will spawn. Each point has a position and a velocity. You probably want their positions to resemble a triangle Guiño

All included emitter shapes (ObiEmitterShapeDisk, ObiEmitterShapeCube, ObiEmitterShapeEdge, etc) extend from ObiEmitterShape, so you can look at them as examples.

cheers Sonrisa
Reply


Messages In This Thread
Obi Fluid Setup - Beginner Question - by hmhmhm - 03-01-2018, 08:26 AM
RE: Obi Fluid Setup - Beginner Question - by josemendez - 04-01-2018, 07:25 PM