+1 vote

Collision Object -> Cylinder Shape -> radius
When I try to enter 0.018 the UI converts it to 0.02
But I am using metric system for gravity, size etc.
I need to define objects at a resolution that is higher than 1cm

What's the logic of truncating values ?
How can I change this ?

...

in Engine by (13 points)

As you can see I can set that value precision beyond 2 decimal points when using the gadgets but not in the Inspector
enter image description here

1 Answer

0 votes

The property hints are configured on a per-property basis. This is done manually by the engine developers who will try to pick the most "logical" step value (see this discussion on GitHub). As a workaround, you can set the value in a script to avoid snapping to the nearest value allowed by the editor.

There is a Default Float Step property in the Editor Settings, but it only impacts properties that don't specify their own step value. It defaults to 0.001, so it's not being used for the CylinderShape radius here.

by (12,889 points)

This very point is causing me headaches on exported variables when I use math like:
1/30 or floating point versions of 0.033

It gets rounded to .1 in the inspector, even if I set a step of 0.001.

export(float, 0, 1, 0.001) var sample_rate:float = 1.0/25.0

The -slider- works on the increments but text entry is flawed.

Whoops the minimum value on export was 0.1 in the real case. Pilot error!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.