Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi 7.0 ParticleAPI
#2
(29-08-2024, 11:37 AM)PlatonSk Wrote: I’m trying to get the position of a particle at runtime using
Code:
for (int i = 0; i < actor.activeParticleCount; i++)
{
    var solverIndex = actor.solverIndices[i];
    var particlePos = actor.GetParticlePosition(solverIndex);
}

However, when the solver backend is set to GPU, it returns the position from the blueprint instead of the current position in the simulation. 

Is this a bug? 
If not, how can I retrieve the particle's position using the GPU (and is it even possible)?

Try this instead
Code:
actor.solver.positions[solverIndex];
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