Hello again,
I’ve managed to work around the async issues for now.
Regarding your comment when adding particles:
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]](https://i.ibb.co/MkBmhf8n/Screenshot-2025-04-29-124753.png)
As a result, the saved and loaded rope does not appear the same.
![[Image: loaded.png]](https://i.ibb.co/8n5Z6CxK/loaded.png)
I think the difference between the two images is caused by this issue.
Thank you.
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();
}
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]](https://i.ibb.co/MkBmhf8n/Screenshot-2025-04-29-124753.png)
As a result, the saved and loaded rope does not appear the same.
![[Image: saved.png]](https://i.ibb.co/cMSH5N5/saved.png)
![[Image: loaded.png]](https://i.ibb.co/8n5Z6CxK/loaded.png)
I think the difference between the two images is caused by this issue.
Thank you.