If you want something to CHANGE then you need STATE.
So, you need to store a CalculatedVisibility boolean in the object.
Then, you need to update that CalculatedVisibility if both of the other booleans change.
The easiest way to do this is to create an UpdateCalcuatedVisiblity function.
Inside this function, check whether each value is different from the CalculatedVisibility.
If both values are different from the CalculatedVisibility then you flip the value of CalculatedVisibility. You can do this with two Branch nodes an a Set node that reads the value and passes it through NOT
When you then need to actually use this value, simply read the CalculatedVisibility boolean.
That being said – it seems unlikely that the behavior you say you want, is actually what you want. Try it, and if it doesn’t do what you expect it to, then maybe step back and describe in a little more details what rules you actually want to enforce.
(For example, what do you want if the “center of the mesh” is below the screen, but the “center of the head” is above the screen? Neither will be “on screen” but a bunch of … stuff … would be “on screen” if rendered.)
If “Top_Of_Character” on-screen value EQUALS “Bottom_of_Character” on-screen value, proceed to next evaluation, else, test again.
If “Been_Fully_on_Screen” value does NOT EQUAL “Top_of_Character” on-screen value, SET “Been_Fully_on_Screen” to unknown value (TRUE?) THEN set “Fully_On_Screen” to TRUE, else, test again from start.
EDIT: My question is where do you reset the “Fully_on_Screen” and “Been_Fully_on_Screen” values?
1 - If top of char and bottom of char are equal (so both on screen, or both not on screen) do 2, else out whatever “onscreen” was already set to.
2 - if top of char is different from whatever “onscreen” was already set to, then set value of “onscreen” to the same as itself, else out whatever “onscreen” was already set to.
how is this complicated?
I mean it already works. I was just wondering if it could be even simpler, like without those branches.
I don’t need to reset the value, just update whenever it changes