Obi Official Forum

Full Version: Force zone not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I want to use force zones, so I put the Spherical Force Zone on a script in a scene with Obi. However, it does not have any effect no matter its size, parameters, or position. How can I see the effect of this Force Zone?

I attached a video showing me using the Spherical Force Zone in the editor with no effect.

Thanks

Charlie
Edit: It won't let me submit a video here, so here's the link instead.
Here's a video of me trying to use Spherical Force Zone. http://vannorman.ai/static/bin/forcezone.mp4
[url=http://vannorman.ai/static/bin/forcezone.mp4][/url]
SOLVED: I had to add the following two lines to ObiSphericalForceZone, and now it works.
But I shouldn't need to modify OBI source code for this functionality. It makes me think I have missed some way to get the solver to update these values itself. Please advise if you know what I'm talking about.

Oni.SetParticleExternalForces(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());
Oni.SetParticleWinds(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());
(22-07-2020, 06:04 AM)vannorman Wrote: [ -> ]SOLVED: I had to add the following two lines to ObiSphericalForceZone, and now it works.
But I shouldn't need to modify OBI source code for this functionality. It makes me think I have missed some way to get the solver to update these values itself. Please advise if you know what I'm talking about.

Oni.SetParticleExternalForces(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());
Oni.SetParticleWinds(actor.solver.OniSolver, actor.solver.wind.GetIntPtr());

No need to modify the source code at all.

For ambient forces to affect the fluid, you need to crank up the fluid's atmospheric drag. No drag = no wind forces. See:
http://obi.virtualmethodstudio.com/tutor...rials.html