Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Can Obi Cloth be paused?
#2
(28-04-2018, 11:37 PM)JayDK Wrote: Hello,

I'm a prospective buyer of the Obi Cloth asset, and I'm looking for a certain functionality.  I would like to know if Obi Cloth can be paused/unpaused at runtime, with the mesh holding its exact shape deformation while paused. I am designing a 2D platform game that will require the instant 180-inversion of a cloth's parent object's y-rotation on left/right user inputs (i.e. the character wearing the cloth reflects, rather than smoothly rotating towards the new bearing).  I want to be able to do so mid-animation without the infinite velocity of the movement affecting the cloth.  In other words, all mesh vertices should be able to remain frozen exactly in place when rotated to the opposite angle, and be able to unfreeze and resume the simulation on the next update.

The native Unity Cloth component doesn't seem able to provide such a functionality, and is generally frustrating to work with. At best, I've been able to temporarily dampen the simulation when switching directions.  But even 100% dampening looks and behaves awkwardly with certain animations, as it doesn't freeze the vertices but rather is a coefficient that dampens the effect of the physics motion.  Basically, it doesn't appear to be a iron-clad, all-around solution for my needs. In addition, Unity Cloth does not jibe with my game's pause function, as its simulation persists while all other graphics are paused.

If Obi can help me solve this problem, I am ready to buy today!

Thanks,
Jarod.

Hi,

You can pause the simulation simply by disabling the ObiSolver component. Then wait until the end of the frame using a coroutine, and re-enable the solver. This is generally used to teleport characters around avoiding unnatural movement of the cloth, which is pretty much your use case (mirroring a character in place)

kind regards,
Reply


Messages In This Thread
Can Obi Cloth be paused? - by JayDK - 28-04-2018, 11:37 PM
RE: Can Obi Cloth be paused? - by josemendez - 30-04-2018, 08:53 AM
RE: Can Obi Cloth be paused? - by JayDK - 30-04-2018, 05:07 PM