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

Fix 3D editor axis drag lines precision issue #57990

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

jmb462
Copy link
Contributor

@jmb462 jmb462 commented Feb 11, 2022

Fixes #57893

Issue description:

Axis drag lines in the 3D editor vibrates when dragging an object.

Fix proposal:

Adding a central point to the axis prevent drawn line to be too long and precision issue.

Before:

bug

After:

fixed

@jmb462 jmb462 requested a review from a team as a code owner February 11, 2022 22:09
@akien-mga akien-mga added this to the 4.0 milestone Feb 11, 2022
@aaronfranke
Copy link
Member

Looks good, we did a similar thing for the origin drawing code: https://github.com/godotengine/godot/blob/master/editor/plugins/node_3d_editor_plugin.cpp#L5877

It likely doesn't matter much either way, but I think it would be better to just copy the values there, placing vertices at ±1024 and ±1048576, so that it goes to over a million and is made up of powers of two.

@jmb462
Copy link
Contributor Author

jmb462 commented Feb 12, 2022

Looks good, we did a similar thing for the origin drawing code: https://github.com/godotengine/godot/blob/master/editor/plugins/node_3d_editor_plugin.cpp#L5877

It likely doesn't matter much either way, but I think it would be better to just copy the values there, placing vertices at ±1024 and ±1048576, so that it goes to over a million and is made up of powers of two.

I can extend to 1048576 then I cannot see any difference with a central point at Vector3() and two points at ±1024 whatever the zoom level is. So not sure if it really needs one more point.

@jmb462 jmb462 force-pushed the fix-drag-lines-precision-issue branch from 47e945b to b452534 Compare February 12, 2022 09:39
@JFonS
Copy link
Contributor

JFonS commented Feb 14, 2022

Thanks!

@JFonS JFonS merged commit 58199e5 into godotengine:master Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

X and Z axis drag lines in the 3D editor suffer from precision issues
4 participants