Interaction with three-dimensional environments