25-06-2024, 09:31 AM
I forgot to mention, I am truly grateful for your response to my question. For some time, I have been struggling to implement the restoration function. Your reply has brought a glimmer of light in the darkness, giving me hope.
Regardless of whether this issue can be resolved in the end, I express my sincere gratitude!
Regarding blueprints, from my code, you can see that I dynamically create blueprints at runtime, from my view, it just like a runtime particles container.
I still don't quite understand. If I still want to use JSON, what data must be saved? Are the ones you mentioned above enough? And if I need to restore, when should the timing be?
Regardless of whether this issue can be resolved in the end, I express my sincere gratitude!
(25-06-2024, 08:29 AM)josemendez Wrote: Is the rope you're using to deserialize your data the same you're using to serialize it?According to my understanding, the ropes are different. After the ropes are moved and entwined by the players, multiple ropes become entangled and eventually stabilize. At this point, the storage function is called. When it is necessary to restore the rope, firstly, generate the simplest rope and fix the start and end points of the rope, because the two ends of the rope need to be fixed according to the Obi attachment, so that the rope can be dragged and move. Then I restore the data from JSON and set it to the particle, theoretically, these are two different ropes, so the data is also different.
(25-06-2024, 08:29 AM)josemendez Wrote: Based on your post, my guess is that prior to deserializing your data you're instantiating a blueprint with just start/end control points. This will create a straight rope between both points, which will of course be shorter than the original one and have less particles and less constraints as a consequence.
If your goal is to save and then restore the particle positions, you must make sure the rope you're restoring them to is the exact same one you stored them from.
Regarding blueprints, from my code, you can see that I dynamically create blueprints at runtime, from my view, it just like a runtime particles container.
I still don't quite understand. If I still want to use JSON, what data must be saved? Are the ones you mentioned above enough? And if I need to restore, when should the timing be?