Skip to content

Remove Physical and add Physical question #247

Answered by drcmda
neciszhang asked this question in Q&A
Discussion options

You must be logged in to vote

hooks cannot be conditional in react, normally you put an object "to sleep" if its not supposed to receive physics input, and you wake it up once it has to respond again. i think this would be more efficient than removing it from physics.

otherwise you can unmount (not render) the object and it will be gone. and then remount?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@neciszhang
Comment options

Answer selected by neciszhang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants