Skip to content

Expose Camera2D current rotation #106690

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

Merged

Conversation

NessaTeal
Copy link
Contributor

@NessaTeal NessaTeal commented May 21, 2025

Add get_screen_rotation() to Camera2D which exposes current rotation of camera instead of target rotation. These values can differ in case of applied rotation smoothing.

@NessaTeal NessaTeal requested review from a team as code owners May 21, 2025 19:06
@NessaTeal NessaTeal force-pushed the expose-camera2d-current-rotation branch from fafe9a9 to 8bdbce5 Compare May 21, 2025 19:21
@AThousandShips AThousandShips added this to the 4.x milestone May 22, 2025
NessaTeal added a commit to NessaTeal/dungeon-runner that referenced this pull request May 23, 2025
Use custom version of Godot which includes get_camera_current_rotation function
Opened PR to add that to engine source godotengine/godot#106690
@KoBeWi
Copy link
Member

KoBeWi commented Jun 1, 2025

This is a rotation equivalent of get_screen_center_position(), so it makes sense.
Though it could be renamed to something more consistent, like get_screen_rotation().

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be squashed into single commit.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.5 Jun 2, 2025
@NessaTeal NessaTeal force-pushed the expose-camera2d-current-rotation branch from dc71346 to cf59d74 Compare June 3, 2025 21:22
@akien-mga akien-mga merged commit 590225f into godotengine:master Jun 5, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@NessaTeal NessaTeal deleted the expose-camera2d-current-rotation branch June 5, 2025 12:03
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.

5 participants