Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deactivating the obi solver when not needed ?
#5
(13-05-2021, 03:03 PM)josemendez Wrote: Hi,

You should only disable the ObiSolver component. This stops the simulation, keeping all data in place.

If you disable the entire gameobject, then all actors will be disabled too, all their data (particle positions, velocities, etc) removed from the solver.
Then, this data has to be copied and the actors re-added when you enable it all again, which is considerably more costly.

Haha you're so fast, I wanted to edit my post because just after sending it I decided to try the component... So it's indeed much better, I do get an error though :

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
Obi.ObiParticleAttachment.BreakDynamicAttachment (System.Single stepTime) (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:512)
Obi.ObiParticleAttachment.Actor_OnEndStep (Obi.ObiActor act, System.Single stepTime) (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:217)
Obi.ObiActor.EndStep (System.Single substepTime) (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1161)
Obi.ObiSolver.EndStep (System.Single substepTime) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1592)
Obi.ObiUpdater.EndStep (System.Single substepDeltaTime) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:92)
Obi.ObiFixedUpdater.FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:52)
Reply


Messages In This Thread
RE: Deactivating the obi solver when not needed ? - by VincentAbert - 13-05-2021, 03:07 PM