23-09-2020, 08:41 AM
(This post was last modified: 23-09-2020, 08:43 AM by josemendez.)
Hi!
All particle properties are expressed in solver space. The documentation for actor.GetParticlePosition() reads:
So it's basically a convenience function for when you need world space positions for direct rendering or something similar.
If you retrieve the particle positions in world space, but later apply them as if they were expressed in the solver's local space, problems like the one you're experiencing may happen
.
Either retrieve the position by reading it from solver.positions directly (without any conversion to world space), or -if you want to use GetParticlePosition()- convert them back to solver space when applying the stored positions back.
All particle properties are expressed in solver space. The documentation for actor.GetParticlePosition() reads:
Quote:Given a solver particle index, returns the position of that particle in world space.
So it's basically a convenience function for when you need world space positions for direct rendering or something similar.
If you retrieve the particle positions in world space, but later apply them as if they were expressed in the solver's local space, problems like the one you're experiencing may happen

Either retrieve the position by reading it from solver.positions directly (without any conversion to world space), or -if you want to use GetParticlePosition()- convert them back to solver space when applying the stored positions back.