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
#6
Hello again,

I’ve managed to work around the async issues for now.

Regarding your comment when adding particles:

Quote:This code appends a new element that links the first particle of the previous element with the new active particle. It should link the second particle of the previous element instead.


Code:
while (rope.activeParticleCount < particleCount)
{
    rope.elements.Add(new ObiStructuralElement
    {
        particle1 = rope.elements[^1].particle1, //--> these are not correct!
        particle2 = rope.elements[^1].particle2, //--> these are not correct!
        restLength = rope.interParticleDistance
    });
    rope.ActivateParticle();
}
How can I determine the last active particle here? In other words, what should particle1 and particle2 be? I was not able to acquire index of the particle that was activated last.

I’ve also figured out what this causes. When used this way, all the ObiStructuralElement entries I add to the array are incorrect.

[Image: Screenshot-2025-04-29-124753.png]

As a result, the saved and loaded rope does not appear the same.

[Image: saved.png] [Image: loaded.png]

I think the difference between the two images is caused by this issue.

Thank you.
Reply


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