- Home /
InteractiveCloth & ClothRenderer pauseWhenNotVisible issue
If 'ClothRenderer.pauseWhenNotVisible' is applied, toggling the active state of the parent object causes the cloth simulation to pause and not recover it's simulation (i.e the cloth becomes static) on the second round of disable -> enable.
If 'ClothRenderer.pauseWhenNotVisible' is false all is working as intended (as you'd expect but having a cloth sim running in the background is not good).
Setup factoids:
Running on Unity 4.x Beta (problem was still there in Unity 3.x and the .activeSelf/InHierarchy are behaving as expected)
Failed solution attempts to date:
Manually calling SendMessage("OnBecameVisible") to the object with the cloth components; Unity asserts with 'no message receiver' warning; this led me on to:
Adding a script to the object so to ensure the object is receiving OnBecameVisible/Invisible calls and also verify all .active flags are set as expected: when made visible the obejct receives 2 of these calls from Unity and yet nothing
Calling AddForceAtPosition on activate to jostle cloth into action; no effect
Toggling InteractiveCloth.enabled in an attempt to kickstart the simulation; nada
Any further help or suggestions would be greatly appreciated!
UPDATE: after having a few pokes around this I have found an alar$$anonymous$$g 'fix' for the issue; disabling the InteractiveCloth, either in the editor or through code, allows the cloth the behave as expected! I found this out by simply testing every parameter of the cloth at runtime to try and see where the issue might be.
Completely counter-intuitive and plain bizarre...
Your answer
Follow this Question
Related Questions
Objects go through InteractiveCloth, why? 1 Answer
Unable to move InteractiveCloth with AddForceAtPosition 0 Answers
Is Cloth component's overhead affordable for mobile MMOs,if added to many characters in scene? 1 Answer
Unity cloth stops moving (simulating) after a short time? 0 Answers
Unity 5.0.x Cloth physics issue. 1 Answer