Obi Official Forum
Feedback Should ObiAmbientForceZone take into account isVisible and simulateWhenInvisible? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Feedback Should ObiAmbientForceZone take into account isVisible and simulateWhenInvisible? (/thread-3398.html)



Should ObiAmbientForceZone take into account isVisible and simulateWhenInvisible? - niuage - 08-04-2022

I was just wondering if ObiAmbientForceZone couldnt be improved to not do any computation for the solvers that have been marked as "dont simulate when not visible"?

Solver_OnStepBegin could exit early for instance.

I could certainly make the changes myself, but just wanted to see if that made sense.


RE: Should ObiAmbientForceZone take into account isVisible and simulateWhenInvisible? - josemendez - 11-04-2022

(08-04-2022, 10:06 PM)niuage Wrote: I was just wondering if ObiAmbientForceZone couldnt be improved to not do any computation for the solvers that have been marked as "dont simulate when not visible"?

Solver_OnStepBegin could exit early for instance.

I could certainly make the changes myself, but just wanted to see if that made sense.

Hi!

Yes, you could certainly skip the loop over all particles if the solver is not visible. I can't think of any reason not to do this, so will probably add this by default on future updates.