Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi 7.0 ParticleAPI
#10
(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:
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.
Thaks you chenji and jose,

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
Reply


Messages In This Thread
Obi 7.0 ParticleAPI - by PlatonSk - 29-08-2024, 11:37 AM
RE: Obi 7.0 ParticleAPI - by goosejordan - 29-08-2024, 12:01 PM
RE: Obi 7.0 ParticleAPI - by josemendez - 29-08-2024, 12:02 PM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 09-06-2025, 04:33 PM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 06:23 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 10-06-2025, 08:31 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 08:47 AM
RE: Obi 7.0 ParticleAPI - by chenji - 10-06-2025, 09:40 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:16 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 10-06-2025, 10:18 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:26 AM
RE: Obi 7.0 ParticleAPI - by alicecatalano - 12-06-2025, 09:19 AM
RE: Obi 7.0 ParticleAPI - by josemendez - 10-06-2025, 10:21 AM