You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Vector2 returned by Camera2D::get_screen_center_position() is (incorrectly) affected by the camera's rotation. Rotating the camera will cause get_screen_center_position to return different values, despite the actual center being in the same place.
In this example project there are two scenes with similar setups.
One Sprite, colored red, follows the Camera2D's get_screen_center_position()
The other Sprite follows the Camera2D's get_target_position() for comparison
The Camera2D being followed is rotated by delta in _process
one_cam.tscn is from the perspective of the rotating camera.
two_cams..tscn is from the perspective of a second, zoomed out camera.
Godot version
v4.2.beta.custom_build [b137180], v4.1.2.stable
System information
Godot v4.2.beta (b137180) - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen Threadripper 1950X 16-Core Processor (32 Threads)
Issue description
The Vector2 returned by
Camera2D::get_screen_center_position()
is (incorrectly) affected by the camera's rotation. Rotating the camera will causeget_screen_center_position
to return different values, despite the actual center being in the same place.Steps to reproduce
get_screen_center_position
returns incorrect values.Minimal reproduction project
In this example project there are two scenes with similar setups.
One Sprite, colored red, follows the Camera2D's
get_screen_center_position()
The other Sprite follows the Camera2D's
get_target_position()
for comparisonThe Camera2D being followed is rotated by delta in _process
one_cam.tscn is from the perspective of the rotating camera.
two_cams..tscn is from the perspective of a second, zoomed out camera.
ReproProject.zip
The text was updated successfully, but these errors were encountered: