Skip to main content

Float Is Now Double Precision

Blueprint float variables are double precision in Unreal Engine 5, and here's what that means for your project.

Published Updated |
Variables
Blueprints
graphic

Unreal Engine 5 brought about significant sweeping changes and many new additions. One of those changes is the Large World Coordinates system, which moved the engine’s core math types to double-precision floats, and Blueprint floats came along for the ride.

What is a double-precision float?

In Unreal Engine 4, a Blueprint float represented a 32-bit floating point number, which was good for roughly 7 significant digits. A double-precision float is a 64-bit floating point number that holds roughly 15 to 16 significant digits.

Why did Unreal Engine 5 add double-precision floats?

To clarify, doubles have been a part of the engine for a long time, they just weren’t supported in Blueprints or in many core systems until Unreal Engine 5.

The main reason for the change is to support large worlds, thus why it’s called Large World Coordinates. A 32-bit float loses precision as you move away from the world origin, so in Unreal Engine 4 the maximum world size was 2,097,152 units, about 21 km across. With Large World Coordinates, it’s about 88 million km.

How does double precision affect Blueprint float variables?

In Unreal Engine 5, every Blueprint float variable is double precision. The variable type picker simply lists it as Float, and where the subtype matters, the editor shows it as Float (single-precision) or Float (double-precision).

A float only narrows to single precision when you pass it to a C++ function or property that still uses a 32-bit float, and the Blueprint compiler inserts that conversion for you.

I’m upgrading from Unreal Engine 4. Do I need to update my float variables?

No. When an Unreal Engine 4 Blueprint loads in Unreal Engine 5, its float pins and variables convert to double precision automatically.

What about my C++ code?

C++ still decides the precision. A UPROPERTY declared as float stays 32-bit, even when Blueprints read it as a Float, and passing a Blueprint value into a C++ float parameter drops precision. If a value needs full precision, it’s ideal to declare the C++ side as double.

Double-precision floats are a huge deal, but only if you’re pushing the limits of your Unreal Engine world.

If you’re interested in learning more about variables in Unreal Engine, check out my article Blueprint Variables: What you need to know, as I cover every aspect of a Blueprint variable.

Check out the following resources to learn more about the subject.

Unreal Directive is free and ad-free.

If it saved you time, you can help keep it that way.

Donate