-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Incorrect work of look_at function #89578
Comments
The issue happens for MRP changed to produce the above: Bug2.zip |
Mhh that's interesting. The integer scaling PR does not explicitly change the way the surface is attached AFAIK, although since it allows the buffer to "overflow" out of the window it might have exposed this discrepancy with the way input is scaled. Maybe the input is scaled relative to the viewport, so by breaking the window-viewport connection it looks weird. Not sure. I'll take a look at this as soon as I have some time. |
To me, it is not clear, what the bug is exactly:
|
@Sauermann given our coordinate system (X+ = left; Y+ = down), I'd argue that the correct case is the first. |
I agree, that the Viewport should be attached to the top-left corner. |
When using "Compatibility" rendering method, "scale_mode" set an integer and viewport height greater than the window height, viewport becomes misaligned with window leading to a rendering offset. This causes the engine's mouse position to no longer match the real mouse position. To fix this issue, the viewport, which was previously render-wise attached to the window's bottom-left corner was changed to be attached to the window's center.
Tested versions
System information
Windows 10 - Godot v4.2.1.stable - Compatibility
Issue description
The bug occurs when:
The bug manifests as if the rotation angle is being calculated not from the position of the node, but from some point with an offset from the node. This offset correlates with the difference between the viewport size in the project settings and the window size.
Steps to reproduce
To reproduces the bug, you can use the
look_at(get_global_mouse_position())
function in any node, such as Sprite2D.Minimal reproduction project (MRP)
Bug.zip
The text was updated successfully, but these errors were encountered: