The film you are thinking of is likely eXistenZ, which centers on people who have a device plugged into them and become immersed in a game-like reality.
It plays with the idea of not knowing what is real, much like being controlled without full awareness of your actions.