Constrain a list of particles #110
Unanswered
ThomasRutzer
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am stuck here:
I need to create a dynamic list of particles, preferable with
useParticle
and then constrain the cannon bodies (the logic for that is not so important right now).The problem is, that I am not sure what is the best approach to store each particle ref in a surrounding parent component and then use
useDistanceContraint
because React is not happy with using a hook inside a loop.Has somebody already worked with a dynamic list of cannon bodies and constraints?
Beta Was this translation helpful? Give feedback.
All reactions