Obi Official Forum
Help ObiRope 7.0 save/load - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help ObiRope 7.0 save/load (/thread-4541.html)



ObiRope 7.0 save/load - natko1412 - 22-08-2025

Hello,
 
I am working on Save/Load of my obi rope. The thing is that rope changes length at runtime, so I managed that by saving length changes, positions and velocities in the solver. When I need to load the rope, I just change its length in For loop the same as I did for the rope before with the cursor.ChangeLength(len) and after that I set the same positions in solver as before and that worked in v6.x. Now in v7.0, it doesn't work anymore. The main problem, as I see it, is that the rope isn't changed immediately, but at the start of the next solver update so my positions and velocities are loaded before the rope changes. I tried waiting with Enumerators or in while loops, but none worked for me. So I changed my approach and tried with an example from this thread: https://obi.virtualmethodstudio.com/forum/showthread.php?mode=linear&tid=4485&pid=16920#pid16920 . When I set up this approach I got the same issue. It was all good when the rope got shorter, but when it grew and I needed to add new particles, the particles that I added weren't active. They would be in the right position but static and old particles would move normally. Is it that this new rope.ActiveParticle() without input activates one of the pooled particles? I am still trying to find a way to add particles without problem or a different approach to Save/Load the rope.
 
Thanks in advance for your reply.


RE: ObiRope 7.0 save/load - chenji - 22-08-2025

(Yesterday, 10:25 AM)natko1412 Wrote: Hello,
 
I am working on Save/Load of my obi rope. The thing is that rope changes length at runtime, so I managed that by saving length changes, positions and velocities in the solver. When I need to load the rope, I just change its length in For loop the same as I did for the rope before with the cursor.ChangeLength(len) and after that I set the same positions in solver as before and that worked in v6.x. Now in v7.0, it doesn't work anymore. The main problem, as I see it, is that the rope isn't changed immediately, but at the start of the next solver update so my positions and velocities are loaded before the rope changes. I tried waiting with Enumerators or in while loops, but none worked for me. So I changed my approach and tried with an example from this thread: https://obi.virtualmethodstudio.com/forum/showthread.php?mode=linear&tid=4485&pid=16920#pid16920 . When I set up this approach I got the same issue. It was all good when the rope got shorter, but when it grew and I needed to add new particles, the particles that I added weren't active. They would be in the right position but static and old particles would move normally. Is it that this new rope.ActiveParticle() without input activates one of the pooled particles? I am still trying to find a way to add particles without problem or a different approach to Save/Load the rope.
 
Thanks in advance for your reply.
There are 3 Synchronization setting in the Solver which may be related to the problem you encounter. Try them to see whether one works for you.
https://obi.virtualmethodstudio.com/manual/7.1/obisolver.html