Combining collider and mouse cursor over object

Hi,

I’m creating a light switch and I want it to be activated when player enters collider and mouse cursor is on the switch. I’ve managed to get it to work with collider but now I need to meerge these two conditions. AND is not working because it says thet i cannot use boolean with it. What should I do?

Basically it is supposed to work like in FPP RPGs (like Skyrim). I need two conditions to be fulfilled:

  • appropriate distance to the object;
  • mouse cursor needs to be over it.

How do I combine these two?
Thanks

Solved it myself with line trace and collider sphere attached to my Player Character.