Setting particles.state with boolean indexing in v4 when number of particles is changing #2403
Unanswered
reint-fischer
asked this question in
Q&A
Replies: 1 comment
-
|
I think this is directly related to #2143, that @VeckoTheGecko is working on. Good for him to have this background info, I guess |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Question
I am running a simulation using v4 where particles are released at different times and I want to delete them when they run out of bounds. Setting
particles.statewith boolean indexing doesn’t work, sincelen(particles) != len(particles.state). I assume that has to do with particles not being released yet. Is this expected behavior, and if so, is there a suggested solution?Supporting code/error messages
This works when the particles are all released at the same time, but breaks when using this delayed release:
Alternatively, I tried to select just
particles.state, but that does not allow me to set a new state:Simulation setup
Beta Was this translation helpful? Give feedback.
All reactions