Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use ParticleAtom.extractParticleClosestToCenter() instead of BANModel.getParticleToReturn #188

Closed
zepumph opened this issue Aug 30, 2023 · 1 comment
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Aug 30, 2023

Promoting TOOD made while investigating #105.

This is a newish function, so it could replace this older code.

@zepumph zepumph assigned zepumph and Luisav1 and unassigned zepumph Aug 30, 2023
@Luisav1 Luisav1 changed the title Can we use ParticleAtom.extractParticleClosestToCenter() instead of BANModel.getParticlesByType Can we use ParticleAtom.extractParticleClosestToCenter() instead of BANModel.getParticleToReturn Aug 30, 2023
@Luisav1 Luisav1 changed the title Can we use ParticleAtom.extractParticleClosestToCenter() instead of BANModel.getParticleToReturn Can we use ParticleAtom.extractParticleClosestToCenter() instead of BANModel.getParticleToReturn Aug 30, 2023
@Luisav1
Copy link
Contributor

Luisav1 commented Aug 31, 2023

This can't be done because of two things:

  • getParticleToReturn returns the particle closest to the particles creator node while extractParticleClosestToCenter gets the particle closest to the center of the atom
  • extractParticleClosestToCenter also extracts the particle, it removes it from the particle atom which we don't want being done until after the particle is animated away from the particle atom.
    Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants