Switch material on mouse click without box collision or widget

I’m thinking of opening a new thread as it would be off topic here.