Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope saving and restore by Json
#6
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!  Gran sonrisa



(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?
Reply


Messages In This Thread
Rope saving and restore by Json - by tapLucas - 22-06-2024, 03:32 PM
RE: Rope saving and restore by Json - by tapLucas - 22-06-2024, 06:37 PM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:02 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:31 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 09:55 AM
RE: Rope saving and restore by Json - by tapLucas - 25-06-2024, 10:26 AM
RE: Rope saving and restore by Json - by tapLucas - 27-06-2024, 11:54 AM
RE: Rope saving and restore by Json - by tapLucas - 27-06-2024, 12:59 PM
RE: Rope saving and restore by Json - by tapLucas - 11-07-2024, 07:21 AM
RE: Rope saving and restore by Json - by tapLucas - 17-08-2024, 09:02 AM
RE: Rope saving and restore by Json - by tapLucas - 17-08-2024, 10:37 AM
RE: Rope saving and restore by Json - by tapLucas - 17-08-2024, 11:10 AM