Vladimir Alinsky
Vladimir Alinsky

Reputation: 220

How to switch Bevy engine from f32 to f64 type?

I want to switch the type for translation across all components of my project. I know there are special f64-based types, but how to enable them for the entire engine? For example for the Transform component? Is there something like DTransform?

Upvotes: 0

Views: 100

Answers (1)

Vladimir Alinsky
Vladimir Alinsky

Reputation: 220

It's not supported yet. Bevy team plans to change it for more flexibility, see the status by this discussion issues/1680.

Currently, the best way to fix rendering and calculations when you work with large distances is to use big_space plugin.

From the big_space docs:

  1. Disable Bevy’s transform plugin: DefaultPlugins.build().disable::<TransformPlugin>()
  2. Add the BigSpacePlugin to your App
  3. Spawn a BigSpace with spawn_big_space, and spawn entities in it.
  4. Add the FloatingOrigin to your active camera in the BigSpace.

Upvotes: 1

Related Questions