-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Improve process logic in Camera2D #46717
Conversation
69346d8
to
c2067ed
Compare
While testing I noticed a slight vulnerability. The user could manually set the camera process mode using node functions, and bypass the camera logic. So I've added an extra check for this ( We could place a WARN_PRINT_ONCE when this occurs? Wasn't sure whether this would be preferred. |
The current code changes seem sensible to me. I'll try to test some projects to make sure that things behave as expected.
I think that's a general design issue which extends beyond just the Camera2D API. The internal process modes were added specifically to handle Node-internal logic that shouldn't be messed with by users. Yet, we still expose those methods to let them shoot themselves in the foot, just like they can |
c2067ed
to
02e5158
Compare
Documentation seems to be alright:
|
02e5158
to
beeede6
Compare
The logic for internal process and internal physics process in Camera2D was very buggy and convoluted for historical reasons. This is a cleanup to make the logic simpler and easier to follow.
beeede6
to
8763d89
Compare
Thanks! |
The logic for internal process and internal physics process in Camera2D was very buggy and convoluted for historical reasons.
This is a cleanup to make the logic simpler and easier to follow.
Notes
is_editor_hint
spread all over the place. The active flag is set in one place, and makes it far easier to read / should make it less bug prone.follow_smoothing
to zero, and the old_set_old_smoothing
function.