Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move fluid based on device orientation - ObiSphericalForceZone?
#2
(01-11-2018, 03:46 PM)p3gamer Wrote: I am trying to move fluid around when I tilt/rotate the device. I tried adjusting the gravity in the solver (ie. change y value from -9.81f to 9.81f when device is upsideDown), but that didn't seem to work. I am looking into ObiExternalForce, in particular (ObiSphericalForceZone), but I am not sure how to implement this after I added the component to the emitter.

Hi there,

You can use the reading from the device's accelerometer to drive gravity directly. Change the gravity in the solver, and don't forget to call solver.UpdateParameters() afterwards. That should do it.
Reply


Messages In This Thread
RE: Move fluid based on device orientation - ObiSphericalForceZone? - by josemendez - 01-11-2018, 06:17 PM