Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Issue Saving/Loading Particle Positions in play mode using ObiRope v7.0
#5
(29-04-2025, 08:55 AM)ozeecode Wrote: Hello, thank you for your response .

First of all, I want to ask this:
When I directly instantiate the ObiRope prefab and place it into the solver, since it doesn't have any particles yet, this line throws the following error:
ns, data.lastParticlePositions);[/code]

Is there a way to remove this delay?
Code:
await UniTask.Delay(100);

Actors aren't loaded into the solver right away, as this could happen while the simulation is underway on a different thread and cause race conditions. They're usually loaded at the start of the next simulation step.

Just wait until the actor has been loaded. Actors have an OnBlueprintLoaded event for this purpose (similarly, they have an OnBlueprintUnloaded event). There's also a isLoaded boolean that you can check later on, or on a coroutine.

(29-04-2025, 08:55 AM)ozeecode Wrote: As for my main issue, if I use the Load() method I sent in my first message exactly as it is, none of the particle positions are set. They all remain in their initial positions. In other words, my rope appears as it was set in the blueprint. I suspect this happens because it's an asynchronous process, but I’m not sure.

Correct: actor loading in Obi is asynchronous and always has been, so if your script worked in previous versions is likely out of luck.

kind regards
Reply


Messages In This Thread
RE: Issue Saving/Loading Particle Positions in play mode using ObiRope v7.0 - by josemendez - 29-04-2025, 09:05 AM