-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Rename Camera2D's *_screen_center
and *_position
to get_screen_center_position
and get_target_position
#64880
Conversation
1c129ca
to
1e13218
Compare
I was thinking if |
It definitely is. I've used this method for fine-tuning, displaying the target position during debugging to better understand the internal behaviour, and in particular, I've required it to restore the camera exactly as it was after saving and reloading from a PackedScene. I really struggled to find it, however, because of the poor naming. Definitely shouldn't be exposed as a full property, but it's really nice to have and see as is. |
During the meeting, we agreed to remove the camera suffix, but couldn't agree on the exact naming. |
I think adding |
So it should then be |
151513f
to
7ca9ccf
Compare
*_screen_center
and *_position
to get_screen_center
and get_target_position
*_screen_center
and *_position
to get_screen_center_position
and get_target_position
7ca9ccf
to
efb43f5
Compare
`get_camera_screen_center` -> `get_screen_center_position` `get_camera_position` -> `get_target_position`
efb43f5
to
ec96378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in PR review meeting.
Thanks! |
As brought up in: #54161 (comment), #54161 (comment).
I am fuming, how did I forget to write this sooner, dang it! I was the one complaining about it!These Camera2D properties have very confusing and redundant names. Most egregiously, last time I edited the documentation, I had to carefully tip-toe around
get_camera_position()
to make sure it wasn't being confused with Node2D.position
. This PR attempts to address that.get_camera_screen_center
->get_screen_center_position
get_camera_position
->get_target_position
Also improves the documentation of these two.
Previously this PR wasget_camera_screen_center
->get_screen_center
Note: Unlike other PRs similarly to this, I left their internal names untouched. See #63773.