Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Runtime rope deserialization issue
#2
(18-09-2023, 01:48 PM)aderae Wrote: 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!

Hi there,

The data in the solver arrays will be overriden when the actor gets its blueprint loaded. You should do any modifications after the blueprint is loaded, by subscribing a method to the ObiActor.OnBlueprintLoaded event and putting your code there.

kind regards,
Reply


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