-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Stand-alone CollisionPipeline doesn't account for changes to bodies #815
Comments
Also to add, this affects all body changes via |
I share your concerns about this being error-prone, if you have a minimal reproduction use case, this could be a good base to make a new test and make sure it works in an expected way :)
|
(had put this in the wrong issue... moving it here) The same/similar issue is mentioned in #662
Here removing the rigid body set from the collision pipeline is proposed. I was using them to have colliders offset from some other origin. I could keep track of this manually with the proposed change OR I could probably get the same behavior using a compound shape with only one shape in the vec (with a non-identity position). |
Related to #191 (Stand-alone QueryPipeline doesn't account for changes to bodies)
I am using the
CollisionPipeline
with colliders attached to parent bodies (with some positional offsets). Upon stepping the pipeline, the respective modified bodies lists are cleared but the actual changed bits of the bodies in theRigidBodySet
are not. This prevents the body from ever getting re-added to the modified list upon subsequent changes (i.e., when I update the parent body's position usingget_mut
).The blocking check starts here:
rapier/src/dynamics/rigid_body_set.rs
Line 177 in 2f9d9ba
and the modification addition skipped here:
rapier/src/dynamics/rigid_body_set.rs
Line 169 in 2f9d9ba
The if check never passes because the modified bits are already set (from never being cleared).
propagate_modified_body_positions_to_colliders
doesn't work either due to the above (uses modification list, not changed bits)The physics pipeline calls is own helpers,
clear_modified_colliders
andclear_modified_bodies
while theCollisionPipeline
only calls a singleclear_modified_colliders
Should the
CollisionPipeline
clear the modified body bits? If not, and/or adding a way to clear the changed bits in myRigidBodySet
manually would help (not in public API currently).Workaround
As of right now, I can get the changes to propagate by manually updating the collider positions wrt their parent (to the same value 🙃) every time I move a body like so:
Awesome library btw, thanks for all the hard work 🎉
The text was updated successfully, but these errors were encountered: