In Star Trek: TNG, Barclay uses the holodeck for sex, including creating versions of crew mates like Troi. It wasn't her, but it looked like her.
I used to think the holodeck would be incredible to have. And it would be. But it'd turn into a debauched sex chamber that most crew members would become addicted to in about a week.