-
Notifications
You must be signed in to change notification settings - Fork 125
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
get_intersection is inaccurate with a near horizontal camera #498
Comments
Hi, I updated to the latest build, but I think it isnt better.
Ill share a video in a second. I added a debug marker to show the two collision position to demonstrate better. red is estimate, green is get_intersection |
Sharing the debug log, this is mapped to every click recorded in the video. red marker is where the estimate returned, versus green for get_intersection Hearts.Of.Steel.Debug.2024-10-05.01-40-35.-.Copy.-.Trim1.mp4part2:
Had to compress/downsample/lower the framerate, but as you can see, green (get_intersection) can be very far off where the mouse meets the terrain. red (iterative approximation) is not perfect, but it is much closer to the reference point so the error estimate is legitimate. I think the reason why this may not have been massive in the editor is because the camera angle is almost vertical, whereas here it is horizontal. let me know if you'd like to look at my source code, ill edit out the unnecessary stuff and upload the project files upon request |
Terrain3D version
v.0.9.3-beta
System information
Godot 4.3 - Windows 10 - RTX 3080 TI - Vulkan Forward+
Is the issue reproducable in the demo?
Yes
Issue description
get_intersection is inaccurate when trying to use click detection on a flat/horizontal camera. Here is a trail of logs that show the potential deviation
Hearts.of.Steel.DEBUG.2024-09-25.01-26-48.mp4
Below is my project (if you run with console and right click on the map, you will get reports of error, distance etc)
Hearts.of.Steel.zip
Logs
The text was updated successfully, but these errors were encountered: