It's complicated, in that this depends on jurisdiction. In some places, the age of the character matters, not just the actor's age. Regardless of legality, I think this is very prominent in self censorship. A lot of filmmakers wouldn't depict a nude 15 year old sexually, regardless of the actor's actual age.