Skip to content
This repository was archived by the owner on Jul 12, 2026. It is now read-only.
This repository was archived by the owner on Jul 12, 2026. It is now read-only.

How to better handle large-scale simulations with huge numeric values #353

Description

@ShineLuLu

Hi, I'm new to Rapier and really appreciate the great work on this physics engine. I'm currently using Rapier.js in a frontend project for geospatial applications.
One issue I’ve run into is that the Earth isn’t flat — gravity direction varies across regions. I handled this by updating the gravity vector dynamically, which works fine.
However, another problem is that my data values are typically very large and require high precision. Scaling them down for simulation leads to noticeable precision loss, and I haven’t found a good workaround. I suspect this is because Rapier is optimized for small-scale scenes and uses Float32 internally.
Would it be possible to optionally enable Float64 precision, even at the cost of performance? Or are there recommended approaches for handling large-scale simulations accurately?
Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions