Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Freezing and moving obi fluid
#2
(27-03-2020, 08:37 PM)Andrew Graham Wrote: Hello,

I am using Obi Fluid for a game, and I am very impressed. However, I am stuck at something that I thought would be easy.

I am pouring a viscous fluid over an object, and I want to freeze the motion of the fluid and then rapidly move the object to another position with all the liquid going with it and staying in place. The solver and the emitters are children of the object.

Instead, all the liquid flies off.

If I disable the solver or the updater, the fluid stays fixed in world space and the object moves away from it.

Am I missing something obvious?

Many thanks,
Andrew

Hi Andrew,

If the hierarchy looks like this: object->solver->emitter, moving the object should suffice, as the simulation is performed in solver space. When moving the object around, both the object and any fluid poured over it should move. There's only two things to keep an eye on:

- All world-space inertia scales in the solver are set to zero (if they aren't, a percentage of the solver movement inertia will be applied to the particles)

- The object should be moved in FixedUpdate simulation takes place in the frame. If you move it after (by translating it in Update(), for instance), particles will "see" the object with a 1-frame delay, some will start the frame inside of the collider, be projected outside of it by collisions and fly off. It's very important to update things in the correct order, you can't do things that affect physics outside FixedUpdate().

I've tested this with the included "FluidViscosity" sample scene and it works just fine. Let me know how it works for you.
Reply


Messages In This Thread
Freezing and moving obi fluid - by Andrew Graham - 27-03-2020, 08:37 PM
RE: Freezing and moving obi fluid - by josemendez - 28-03-2020, 11:42 AM