HOME   |   TUTORIALS   |   DEVELOPMENT   |   GALLERY   |   GAMES   |   ABOUT US 
  

Gravity and the viewpoint node

The viewpoint node is the user,s eye into your world, like wise gravity is your way of imposing realistic dynamics upon the viewpoint. Sometimes you want to give your user a special look at things beyond what they can perceive realistically, generally because of gravity. Gravity is a global effecter, not locally to each viewpoint unfortunately. To create a floating viewpoint, a few tricks must be performed to get around gravity. Turning gravity on and off for certain segments is really not an option. An animated viewpoint will not get you further then a jump. This is because if you set up an animation to raise the current viewpoint up in the air, as soon as the animation ends the viewpoint will drop down to the height of your avatar.

To stop the viewpoint from dropping you can create an invisible platform for the viewpoint to land on. There are a number of possiblities you can use with the platform depending on your needs and requirements. If you create a box, and end the animation inside the box the viewpoint will get stuck. The user will not be able to rotate, move or slide the viewpoint. This will lock them into the viewpoint position. To get them out of the box, you can set a timer to start an animation that will move them to a new viewpoint or viewpoint location. You can set a timer to link to a new viewpoint or let them select a different viewpoint from the VRML plugin/viewer's builtin control panel. A final option in this case is to create an external button on the webpage using Java or Javascript. An internal button can not be used because the user can not click through the walls of a solid object they are embeded into. A larger box that can fit a viewpoint and an internal button will allow movement, thus defeating some of the benefits this method allows. The next method presents a way to give the user some movement and allows foe the use of internal buttons.

ramp
Viewpoint node ramp
  --enlarge

A different approach, which was chosen for National Geographic Online's feature Return to Mars, is to create a flat platform and extrude the outside edges to a height greater then the stepping ability of the user's avatar. Once the platform is given full transparency, the user will seem to be floating. The benefit in this is that you can now reliably include inline controls for the user to manipulate his or her environment.

Related Links

Cosmo Software:
Makers of Cosmo VRML software

VRML Consortium:
VRML standards committee