I saw Tron last night...last week...a few weeks ago...all right, a while back, and I enjoyed the movie. It was a fun film with some stunning special effects, and Daft Punk's musical score was a joy to hear. And it gave me some thought on how virtual reality and related environments might be employed in your campaign.
Virtual reality can be handled in two ways. You can go the route of The Matrix and have the characters' bodies held in some suspended state while their minds roam in the alternate environment, or you follow the Tron route and have their bodies and minds both enter the new realm. It is entirely up to you and how you want to handle things. What is important is you create a set of rules for your alternate reality and adhere to them so your players do not feel as if you are deliberately pulling the rug out from under them when they seem to be getting the better of you.
Now, you might be running a fantasy campaign and might be thinking virtual worlds would not work for you. But what is a virtual world? It is an alternate state of reality, which could also describe a dream state, or actions on an alternate plane. Or perhaps you are running a gritty noir-ish game involving cops and criminals and figure virtual reality is way outside your genre. Well hang on there! Perhaps the virtual reality is a drug induced state. In the television series The Prisoner, Number Six was subjected to a combination of drugs, agents in Wild West period costumes and props in order for him to think he was a former sherriff trapped in a small town. It was through sheer will that he was able to break through the facade. Many of the elements of the story resembled a virtual reality environment. Perhaps the PCs have found themselves in the grip of a villain who wishes information from them and would trick them with his artificial scenario? Perhaps the PCs are to be delayed until the villain can accomplish his aims?
There is one twist to the virtual reality concept and that is introducing it in a way where they players are unaware they are in a virtual environment. And this is fine, this can be fun. But it can also be tricky. For example, what if the players discover early on that they are in a virtual reality? I have often found that players can be very clever and see right through to the truth of things. If this happens then you must be prepared to alter your game to suit. The players must have some method to escape otherwise they will feel trapped and helpless. The methods can be varied; perhaps there is an exit they must pass through, perhaps there is a quest they must complete. Perhaps they must die in the virtual world in order to return to the real one? However the method the players must somehow be made aware of it either through investigation or a helpful NPC.
If this option is chosen then you must handle the how of it; how did the PCs wind up helpless and at the mercy of whomever if "VRing" them? If you are running a long term campaign and have earned the players' trust and respect then they are probably going to be willing to accept the idea that somehow their characters were rendered helpless. But if the campaign is in the beginning stages, if the players are mostly new, then I would advise caution. Players do not like to be jerked around. They do not like having their characters manipulated in such a ham-fisted manner. Players love their characters and do not wish to see them abused. The only exception to this would be if this is the hook of your game, the manner in which your players have met. Giving the players an obstacle to overcome in the very beginning is a staple of role playing going back to PCs being dropped into a prison and being forced to escape together. An idea might be they are in a virtual prison and discover a glitch in the system that might be a key to their escape. I recall a TNG espiode where Will Riker was trapped in a virtual world and in some manner managed to break free (and there is The Prisoner episode mentioned above where he too broke free without outside interference). If you do go this route bear in mind players hate being rescued by NPCs. A little NPC aid is always appreciated, but outright rescue rankles.
Using virtual worlds within your worlds can be fun if handled properly, but only if you plan well in advance for player ingenuity and bear in mind the feelings of your players. If you do neither then disaster is...ah...virtually assured...