Varying the length of your shot can be achieved by hitting a little closer to, or further back from, the ball when you strike the sand. You can also vary the length and speed of your wing, but there is a third way of handling longer bunker shots, or ones where the pin is close to the sand or where a high, soft shot is required. That is by varying the club you use.
Taking a lob wedge, instead of the sand wedge will give a higher, softer shot to a close pin. The lob wedge doesn't have the bounce in the sole of the sand wedge, so you will need to swing faster to ensure you get through the sand properly. Make a shallower swing so that you don't dig too deep.
For a longer shot, take a pitching wedge. The ball will have less spin, and so will release forward toward a distant pin.
Varying the length of your shot can be achieved by hitting a little closer to, or further back from, the ball when you strike the sand. You can also vary the length and speed of your wing, but there is a third way of handling longer bunker shots, or ones where the pin is close to the sand or where a high, soft shot is required. That is by varying the club you use.
Taking a lob wedge, instead of the sand wedge will give a higher, softer shot to a close pin. The lob wedge doesn't have the bounce in the sole of the sand wedge, so you will need to swing faster to ensure you get through the sand properly. Make a shallower swing so that you don't dig too deep.
For a longer shot, take a pitching wedge. The ball will have less spin, and so will release forward toward a distant pin.