Use driver to deliver output depending on the state of an objects rotation
Angles 0-90° has positive cos and sin so we use this logic statements  cos(rot)&gt;0 and sin(rot) &gt;0 which evaluate to 1 when the angle is 0-90° and 0 otherwise :



Note: the angle is in radian