Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform.position doesn't follow default_float_step (limited to 3 decimal places) #100594

Open
Zshandi opened this issue Dec 19, 2024 · 0 comments · May be fixed by #100597
Open

transform.position doesn't follow default_float_step (limited to 3 decimal places) #100594

Zshandi opened this issue Dec 19, 2024 · 0 comments · May be fixed by #100597

Comments

@Zshandi
Copy link

Zshandi commented Dec 19, 2024

Tested versions

  • Reproducible in: v4.3.stable.official [77dcf97], v4.0.stable.official [92bee43]
  • Not Reproducible in: v3.6.stable.official [de2f0f1]

System information

Windows 10 - Godot v4.3.stable.official [77dcf97]

Issue description

The transform.position vector x and y values for Node2D and Node3D have a fixed 3 decimal point precision, rather than following the interface/inspector/default_float_step value as they should. This is very limiting, and doesn't match the behavior of the scale value. Though this is related to #18251, it's not the same, as most of the problems described in that issue were resolved by adding interface/inspector/default_float_step, which the transform.position originally followed.

Upon initial investigation, it seems to have been caused by PR #57144, which was to fix a different issue where one was unable to click and drag to change the position values. It seems that the best solution would be to modify the ADD_PROPERTY lines for position to simply omit the step value, which will indicate that it should use the interface/inspector/default_float_step value rather than the current hardcoded 0.001 value.

Steps to reproduce

  1. In the editor settings set the interface/inspector/default_float_step value to something more precise than 3 decimal points, for example 0.0000001
  2. Add or edit a Node2D (or any subclass)
  3. Attempt to set a Position with more than 3 decimal places (for example 0.111111), then hit enter
  4. Result: the value gets rounded to 3 decimal places (for example 0.111)

Note that the scale value works properly in 4.3 (though it didn't work properly in 4.0)

Minimal reproduction project (MRP)

N/A

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

Successfully merging a pull request may close this issue.

2 participants