10-06-2025, 10:18 AM
(This post was last modified: 10-06-2025, 10:33 AM by alicecatalano.)
(10-06-2025, 09:40 AM)chenji Wrote: 1. You get the wrong particle (though it may work in your case sometimes, your code is actually an unstable way, or a wrong way). See https://obi.virtualmethodstudio.com/manu...ropes.html. You must use something like this to get particle position:Thaks you chenji and jose,
int firstParticle = rope.elements[0].particle1;
var firstPos = rope.solver.positions[firstParticle];
2. You get the wrong position. You're getting the local position. If you need world position you must transform local to world.
my rope is a closed loop rope, so i son't know if i have an exact first particle.
seems like i have no idea on how to convert from solver to world space. my corss areas are in the solver hierarchy.
i move them scene by scene using the usual code for moving objects
Vector3 crossPos = GetCrossAreaPositionForRepetition(repetition);
crossArea.transform.position = crossPos;
can you tell me where can i find the lines to change the output frame of the particles so that i know wher they are in the world space? thank you