Closed OceanBreezeGames closed 2 weeks ago
Happens to me with both Godot Physics and Rapier. Also post a video next time so it's clear what the issue is.
Godot Physics:
https://github.com/user-attachments/assets/ac63efe8-3f84-4c77-bfb3-8e00956ed118
Rapier Physics:
https://github.com/user-attachments/assets/d8bd6df3-db3e-450d-99e7-c34b62c90ef2
If it matters, on rapier it seems a bit more stable, but on both they get out of sync after a while. So the two behaviours seem to be similar. Closing issue.
If you manually change the rotation value of a RigidBody2D outside of the expected location (_integrate_forces) the Rapier physics engine behaves differently than the default physics engine for calculating collisions.
Although you shouldn't modify the rotation of RigidBody2D outside of _integrate_forces using PhysicsDirectBodyState2D and the transform it should still behave the same as Godots default physics engine.
In the attached project use the arrow keys to move the ball around the rectangle, as you go around the corners you can see the ball intersects with the rectangle. If you switch to godot physics this does not happen.
Please view the attached project, turn on visible collision shapes.
physics_test.zip