How to convert Actor's Particle Index to Solver's Index and vice-versa - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: General (https://obi.virtualmethodstudio.com/forum/forum-5.html) +--- Thread: How to convert Actor's Particle Index to Solver's Index and vice-versa (/thread-2492.html) |
How to convert Actor's Particle Index to Solver's Index and vice-versa - dasbin - 16-09-2020 Title says it. Basically I'm just trying to iterate through all active particles and get their positions. Actor exposes solverIndices, which I need because the positions are stored in the Solver, but I also need the associated Actor's index of that same particle to check if it's actually active or not, because IsParticleActive runs on the Actor. SolverIndices returns all particles regardless of whether they are actually active or not. Seems like it should be a simple matter, but I can't find anything exposed in the API to find the actorIndex of a given particle! Seems pretty weird considering how many methods take an actorIndex as a parameter on the actor. EDIT: Nevermind, the solution is here: http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html |