19-02-2021, 10:44 AM
Hello,
I'm trying to retrieve the particle positions of 2 Obi Cloth Objectives.
In my scenario, i just created 2 flags with obi cloth blueprints. The two flags are on the same solver but in different world positions.
cloth1 is assigned to the 1st Flag and cloth2 to the 2nd. All good so far (or at least i think so.)
However, when i use, for example:
The result is exactly the same Vector3, despite the 2 flags being on different positions
No matter where i put the flags, the result is always the same.
Am i missing something? Any suggestions?
I'm trying to retrieve the particle positions of 2 Obi Cloth Objectives.
In my scenario, i just created 2 flags with obi cloth blueprints. The two flags are on the same solver but in different world positions.
Code:
ObiCloth cloth1 = Flag1.GetComponent<ObiCloth>();
ObiCloth cloth2 = Flag2.GetComponent<ObiCloth>();
cloth1 is assigned to the 1st Flag and cloth2 to the 2nd. All good so far (or at least i think so.)
However, when i use, for example:
Code:
Debug.Log(cloth1.GetParticlePosition(0));
Debug.Log(cloth2.GetParticlePosition(0));
The result is exactly the same Vector3, despite the 2 flags being on different positions
No matter where i put the flags, the result is always the same.
Am i missing something? Any suggestions?