-
-
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
VisibilityNotifier - add max_distance feature #61544
Conversation
Whoa, nice usecase with stopping animations <3 |
83f9a46
to
e1a77e6
Compare
e1a77e6
to
3722088
Compare
@clayjohn I added the support for ortho cameras, with this snippet here:
However on reflection, I'm not sure whether we should support the distance cutoff in ortho cameras, or just ignore the max distance completely in this situation. The problem is that with an ortho camera, the distance from the near plane has no effect on the screen size of the object, so doesn't make quite as much sense to turn it off and on (from a visual perspective). On the other hand, if we don't use distance here, then if e.g. a game has a main perspective and a small ortho overview camera, the overview camera will always cause the What do you think? The PR will currently ignore ortho cameras but I'll retain a backup of the switching version above depending which we choose. |
3722088
to
409d162
Compare
Last time I checked, the implementation of the light LOD system in |
Yes I think for lights it can make sense to fade. But for this This may be less of a problem if we could fix the animation popping. To solve animation popping I'm thinking in terms of either fading in from the previous state, or even, just not progress the animation timeline when hidden by a Still there may be no right or wrong answer here. I suppose we could make the ortho behaviour selectable (on the |
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.
@lawnjelly I agree, lets disable this for orthogonal cameras and then see if there is user demand.
Enables turning off objects by distance to the camera in addition to testing whether they are in the view frustum.
409d162
to
0c5a424
Compare
Thanks! |
No corresponding PR for master (I just noticed it's not in alpha 13 and started triple checking)??? |
I'll have a look at doing one for master. 👍 EDIT: Turns out the |
Enables turning off objects by distance to the camera in addition to testing whether they are in the view frustum.
2022-05-30.17-57-31.mp4
Notes
VisibilityEnabler
because it is derived fromVisibilityNotifier
. It can also be used to turn offprocess
/physics_process
/ AI etc.VisibilityNotifier
node origin, but users may place the AABB off axis.