-
-
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
Update Camera 2D to fix and remove some notifications #43995
Conversation
I did write a little about it here: as this is basically just a PR on: It may be reasonable to do this, but I agree with reduz .. we need to take care in this area. There needs to be a lot more research into why the It is very possible that by fixing this in this way will introduce other bugs, or have bad effects on performance, or be compatibility breaking with existing games. For instance objects updated before the camera in the scene tree might see it one position, and objects updated afterward see it in another. Order of operations like this can be a minefield. Overall though I don't know enough about this area of order of operations to give a sensible review. You would have to discuss it with reduz, who probably originally wrote this. |
As I stated in #28492
It is expensive, that's why We refused to use
My theory is that reduz tried to call my evidence is he checks if We did a test to see how many times does: they are called the same number of times. So maybe there is no performance problems. only reduz can confirm our hypothesis.
|
We should probably revisit this PR (or at least this general area), as it should fix the remaining problems with camera snapping. We just need to make sure it doesn't cause any regressions due to the order of updates. I've tried it on a few projects and it seems okay - if we are to try this I suspect we will need at least a temporary project setting to enable / disable it in case of regressions, so this would be worth adding to the PR (default to on, as is the preference for testing these things as it is more likely to get more eyes on it). |
Actually I woke up this morning realising why it is done this way, and have a better way of solving this, same basic idea though. Will prepare a PR. |
Thanks to @lawnjelly #46697 We could close this PR. Some notes -This PR deletes some notification cases and letting the Hopefully his change will not result in a bug. As @reduz quoted in his PR:
Thank you. |
Yup there's I've got another PR in to improve the process logic: #46717, but I'll do this in consultation with the others. It would still run ok as is I think, as the fixed version will call I'm also a fan of removing the other notification cases if not necessary, on the other hand with the fixed logic, they may not get called at all anyway if Also, I haven't timed or profiled but I'm not completely sure that I actually first wrote a more complex PR #46569 for ensuring that |
This simple pull request will fix : #28492
By removing the if statement that stops the camera from updating using
NOTIFICATION_TRANSFORM_CHANGED
.And removing the
NOTIFICATION_INTERNAL_PROCESS
as it has no use.As well as
NOTIFICATION_PROCESS