Mine started this and then slowly over months started peeing in my shower and in front of the litter box. Turns out she has arthritis in her back (she's about 20 now!). So days when things hurt more she would find alternate ways to pee. Now she's on a shot for the arthritis and no more peeing where she's not supposed to.
The other cat though, he just enjoys being half in the litter box. He's a little bit weird though.