Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Restart rope at runtime
#1
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?
Reply
#2
(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.
Reply
#3
thanks again Jose!
Reply