Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Runtime rope deserialization issue
#1
Hello,

I have a couple of player modified ropes that are generated in runtime. When the game is saved, I serialize the actor particles positions, velocities and rotations through the solver. When game is loaded, I create the same rope and load the particle data like this:

Code:
solver.positions.SetVector3(i, ParticlePositions[i]);
solver.velocities.SetVector3(i, ParticleVelocities[i]);
solver.angularVelocities.SetVector3(i, ParticleAngularVelocities[i]);

However the moment game is loaded and ObiFixedUpdater started running, my data gets overriden. If I wait for example 2-3 seconds before setting these parameters the rope is already initialized and then after setting these, it works as expected.

Is there any way that I can do this without waiting 2-3 seconds? I tried hooking on OnEndStep of the rope and doing the change there and I tried forcefully stepping the ObiFixedUpdater after I create the rope but none seems to be working.

Thanks in advance!
Reply


Messages In This Thread
Runtime rope deserialization issue - by aderae - 18-09-2023, 01:48 PM