Polaritons in semiconductor microcavities are hybrid quasiparticles consisting of a superposition of photons and excitons. Due to the photon component, polaritons are characterized by a quantum coherence length in the several micron range. Owing to their exciton content, they display sizeable interactions, both mutual and with other electronic degrees of freedom. These unique features have produced striking matter wave phenomena, such as Bose-Einstein condensation, or parametric processes able to generate quantum entangled polariton states. Recently, several paradigms for spatial confinement of polaritons in semiconductor devices have been established. This opens the way to quantum devices in which polaritons can be used as a vector of quantum information. An essential element of each quantum device is the quantum state control. Here we demonstrate control of the wave function of confined polaritons, by means of tailored resonant optical excitation. By tuning the energy and momentum of the laser, we achieve precise control of the momentum pattern of the polariton wave function. A theoretical model supports unambiguously our observations.