-
Notifications
You must be signed in to change notification settings - Fork 63
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
Changing rigid body type on react update doesn't seem to work #314
Comments
Actually, my issue was solved by including the physics type in the key:
|
After thinking about this a bit more, I think this is a hack/workaround - this is just forcing react to create a new tracking object when the state changes, but really reopening |
Indeed, this is intended to work! In fact there is a Demo of this working here: https://react-three-rapier.pmnd.rs/dynamic-type-changes 🤔 However there is an odd situation that the RigidBody does not always go back from |
Is this still an issue in |
This appears to still be happening. I can work around it with
whenever I'm changing the type. This is with |
Same problem here |
I have a rigid body:
If I change
props.physicsType
to "dynamic" (from "kinematicPosition"), the RB does not become dynamic, however if I initializeprops.physicsType
with the value "dynamic" it works.I've also tried calling
addForce
with wake=true, just in case the objects were sleeping and pushing the objects with another object, but nothing works.The React component is definitely re-rendering when the value changes and has the correct/expected props values.
Is this a bug?
The text was updated successfully, but these errors were encountered: