Obi Fluid 3: Obi Solver Modes - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Obi Fluid 3: Obi Solver Modes (/thread-203.html) |
Obi Fluid 3: Obi Solver Modes - mimarilker - 21-10-2017 Hi, I am trying to change ObiSolver Component's/ Parameters/ Mode to "2Dmode" or "3Dmode" with different buttons during gameplay. Actually with a script I was able to change it, however it just changes Parameters/ Mode dropdown menu in apparent, it doesn't effect the solver in real. On the other hand, when I try to change it from the Mode - dropdown directly during the gameplay (without script, just mouse click), it works surprisingly. Is there any other method? This is the code line that I used: public ObiSolver solver; solver.GetComponentInParent < ObiSolver> ().parameters.mode = Oni.SolverParameters.Mode.Mode3D; Thanks for your support (I have sent this via email before, however it may be helpful for others, so I have decided share my problem here, too). RE: Obi Fluid 3: Obi Solver Modes - mimarilker - 22-10-2017 I have seen that it results from Serialize line for solver parameters on the Oni script. I have commented this line, however it makes the solver parameters static, I mean takes the values from Oni script directly, so via another script it cannot be changed. In brief, still waiting for your support. RE: Obi Fluid 3: Obi Solver Modes - josemendez - 22-10-2017 (22-10-2017, 07:48 AM)mimarilker Wrote: I have seen that it results from Serialize line for solver parameters on the Oni script. I have commented this line, however it makes the solver parameters static, I mean takes the values from Oni script directly, so via another script it cannot be changed. In brief, still waiting for your support. Hi, you need to call solver.UpdateParameters() after changing the mode (or any other value of the parameters). cheers! RE: Obi Fluid 3: Obi Solver Modes - mimarilker - 22-10-2017 (22-10-2017, 12:40 PM)josemendez Wrote: Hi, you need to call solver.UpdateParameters() after changing the mode (or any other value of the parameters). Thanks a lot for your continuous support. |