I've been pleasantly surprised at the volume of comments regarding how sand shots play irl. Before I start into this, we're not talking about plugged lies that result from flying the ball into a bunker, just to be clear.
If you get a roll-in lie into a properly raked bunker, you're going to have a great opportunity to make solid contact because it's an incredibly clean lie. That said, the swing is much harder to pull off, the margin of error is much larger as it requires precision at impact. Typically the swing required is one with less lower body movement to keep you grounded and stable, which can definitely mean less distance - but it's not a reduction in distance based on a bad lie, it's because you are swinging with clean contact in mind much more so than with a shot from the fairway. I could see a useful way of implementing this simply being a reduced club distance, maybe 5-10% depending on the club (longer irons punished more), instead of saying it's a variable distance due to a bad lie.
Also, as others have noted, with a full shot out of sand, you're going to get a lot more spin with clean contact than from any other surface. Again, that's due to how clean the lie is, but also because of the angle of attack required to hit it cleanly - meaning, more steep angle, less of a sweep - provided the player makes solid contact.
So, in sum, I think the most sensible way to build this into the game would be to have slightly reduced distances for full shots out of sand - 5% with wedges up to around 10/15% with long irons - but amore demanding blue swingline and tempo range to stay within, and the extent to which the player executes the shot within that blue line and tempo range moderates the amount of spin. Simply put in terms of how it would translate into gameplay, a straighter swing with proper tempo means crisper contact, which produces more spin, but is more difficult to do because of the precision required. [/quote]
This!! ^^^^ Would make play out of fairway bunkers 100% realistic! A slight distance penalty, more spin, and more difficult to hit inside of the cone. Ideally an imperfect swing path/tempo would result in loss of distance due to a fat/thin shot, but a perfectly executed shot should give the player the ability to, for example, hit a green with an 8 iron from ~160 yards. This is without a doubt a realistic simulation of how golf is played by pros and decent amateurs alike.