26-03-2020, 10:35 AM
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:
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?
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;
}
}
Is this expected behavior? Isn't the smoothing only for visuals? not for physics?