dimforge / dimforge/bevy_rapier

Syncing child transforms produces jittery results, which causes further issues

Open
#383 2 comments 0 reactions 0 assignees View on GitHub
A-Integration D-Difficult P-Low question S-not-started
Dominant language
Rust
Stars
1.6k
Forks
282
PR merge metrics
No merged PRs in 30d

Description

When moving at high speeds, the difference is quite apparent as seen here:
![Peek 2023-06-12 22-16](https://github.com/dimforge/bevy_rapier/assets/25857049/4dbfcfec-d9b2-4a79-b05f-413c7c857b22)
The non parent-child relationship is on the left & the weird parent/child pair is on the right.

The camera follows the buggy child in the right pair, which is why the left pair keeps going up as the right pair slows down and the child eventually phases through the parent.
In this example, the top cube is traveling 1m/s slower than the bottom cube.

I assume the error is located somewhere in `writeback_rigid_bodies`. Maybe something wrong with the parent transform being a frame out of sync?

Code for the example in the gif: https://gist.github.com/AnthonyTornetta/2a6a4573126071c961eabe3c95aca247

Update:
After more testing, this is also apparent at low speeds. Even with it only moving 2m/s, the jittering is noticeable & they interact poorly with each other.

Video at low speed (2m/s) (ignore my jittery recording software): ![Peek 2023-06-13 13-43](https://github.com/dimforge/bevy_rapier/assets/25857049/66c31f97-fff6-4b56-99d9-c2b8fedfbe60)
You can see the left pair behave properly and the right parent/child pair react incorrectly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.