dimforge / dimforge/parry

Floating-point precision error at large-numbered positions

Open
#407 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
867
Forks
157
Avg merge
7d 13h
Merged PRs (30d)
2

Description

At higher positions (that is to say, far from 0, 0), collisions begin to act strangely. I personally found this while working on a game in Godot, and one of the maintainers on Github told me to open an issue here. You can see the original issue here:
https://github.com/appsinacup/godot-rapier-physics/issues/489#issuecomment-4054178369

In it is a video that shows what happens. I initially found it when a tester reported that they don't stop walking into a certain object, and with some testing, I determined that it was position-dependent. The exact distance seems to vary, but the further out it is, the more strange the behavior becomes. Closer to 0, 0, pushing into an object makes it claim the position delta is greater than 0, enough for the `is_zero_approx` method to return false. At higher distances, unexpected movements occur as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.