Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiPathSmoother influences physics?
#1
So I was trying to optimize my scene by lowering the smoothing levels of ropes not on camera - hoping that would lead to faster mesh/line rendering. 
However, I've noticed doing this on one of my ropes influences its physics:



Code:
private void OnBecameVisible()
   {
       SetVisuals(true);
   }

   private void OnBecameInvisible()
   {
       SetVisuals(false);
   }

   private void SetVisuals(bool state)
   {
       onCamera = state;

       //will only reappear if solver is enabled
       if (_obiSolver.enabled)
       {
           /*if (_ropeExtruder)
               _ropeExtruder.enabled = state;
           if (_ropeLineRenderer)
               _ropeLineRenderer.enabled = state;
           */
           if (state)
               _obiPathSmoother.smoothing = ogPathSmoothingLevel;
           else
               _obiPathSmoother.smoothing = 0;
       }
   }
If I disable the script, the simulation is more stable (and correct) - if enabled the rope particles (close to dynamically updated static attachments) will freak out.

Is this expected behavior? Isn't the smoothing only for visuals? not for physics?
Reply


Messages In This Thread
ObiPathSmoother influences physics? - by TheMunk - 26-03-2020, 10:35 AM