dimforge / dimforge/bevy_rapier
Dynamic RigidBody getting stuck in corners
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/dimforge/bevy_rapier/assets/7400280/ab4d634c-2697-4586-85e2-11bb5cf3eba0)
And here's a recording from running the example with `carg run -- working`:
[working.webm](https://github.com/dimforge/bevy_rapier/assets/7400280/1fce576d-814c-4cb0-8762-70146a1e1448)
Is there a different setup I should be using for something like this?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.