@export range step rounding error

4.4 Godot Version

Hi - I’m using export range to set a variable with 0.25 step.

@export_range(0, 10, 0.25) var myHeight : float

But in the inspector it rounds up - so on slider I get 2, 2.3, 2.5, 2.8, 3, 3.3 - and not 2, 2.25, 2.5, 2.75, 3, 3.25 etc -

How can I get the correct step to show up in the inspector? Thanks

Tim

Hi,
Try going to Editor > Editor Settings > Interface > Inspector > Default Float Step and increase the value.

1 Like

Thanks for replying - great idea - baseline default float step = 0.001 - I tried increasing it to 0.25 - saved and restarted, and I’m getting the same behavior. Any other thoughts? I appreciate it

Try with 0.0001 (lower the value to increase the precision).

This seems like this bug "@export_range" step parameter causes inspector to visually round to one decimal place · Issue #95725 · godotengine/godot · GitHub

1 Like

Yes, exactly, thank you, I appreciate it!

Im just leaving it as is for time being and using snappedf in code to snap to correct values as precaution - thanks again