CollisionPipeline updates collider when parent body changes #834
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When inserting a Collider with a RigidBody as a parent, the collider doesn't get updated after the first step of the collision Pipeline. The Documentation states:
While this doesn't mention the CollisionPipeline I would expect the same behavior when it comes to position changes made by the user.
Currently those changes only get made once when the body is marked as modified but never a second time, as the flag never gets reset.
This Pull-Request adds a Unit test which tests for the expected behavior and a fix strongly inspired by the PhysicsPipeline.
I'm not a 100% sure that this doesn't open any new issues, however the unit tests all pass and the demos seem to work as expected. I'm obviously also open for different approaches for reaching the expected behavior. However I would like to avoid using the full PhysicsPipeline as I only need collision detection and would like to avoid the overhead of additional physics computations.