RobustToolbox
RobustToolbox copied to clipboard
Physics broadphase displacement
trafficstars
Forgor what issue I put this under.
tl;dr is that
- Sleeping bodies should use the displacement as is (Vector2.Zero). Same with bodies that have their position directly outside of physics.
- Moving physics bodies should use displacement from last position to current position when updating broadphase.
You can probably just add a flag to the broadphase or something and toggle it on when physics starts and off when it's off. Then any moveevents captured during this time consider the oldposition and newposition.