bevy_rapier
bevy_rapier copied to clipboard
Dynamic RigidBody getting stuck in corners
I have a setup with a single dynamic RigidBody on top of a floor and inside of 4 walls all of which have no friction. The dynamic RigidBody is moved by directly adjusting its velocity. I expect the RigidBody to slide around the room between the walls smoothly, but instead it appears to get hung up in corners. I've created a small example showcasing the problem: https://github.com/jhgarner/bevy-physics-repro/tree/main. The example code is in src/main.rs
. You can use cargo run -- broken
and the arrow keys to move the cube around and see the strange behavior. You can also run the repo with cargo run -- working
which will create a slightly smaller RigidBody which doesn't get stuck and moves smoothly. I can't figure out why the slightly larger one exhibits the issue while the smaller one doesn't.
Here's a recording from running the example with cargo run -- broken
:
broken.webm
And here's a recording from running the example with carg run -- working
:
working.webm
Is there a different setup I should be using for something like this?