01-03-2018, 02:01 PM
(27-02-2018, 08:54 PM)leonrdo Wrote: My question is about restart the rope simulation at runtime. I'm trying to restart the rope to its initial state (pooled particles count, path, used particles, etc.) at runtime.
Is there a method or way to restart the simulation via script?
Hi there,
To reset particle positions, velocities, etc, call rope.Reset().
Note this won't reset the rope's length (store the starting length somewhere and call cursor.SetLength(startingLength)), or re-glue together torn pieces of rope. If you wish to reset absolutely everything to its starting state, I recommend using prefabs and control this via instantiation.