One of the most frequently asked questions appearing in the mailing lists and newsgroups is how to create a control panel or other object in a 3D virtual world that does not move. These are called HUDs or Heads Up Displays. The name presumably derives from fighter jet type displays projected onto the cockpit window, a useful mechanism since a glance down at an instrument while travelling at Mach 2 doesn't seem particularly safe.
In a VRML world, when you travel your position and orientation change. The trick is to get the values of your position and orientation and then move the HUD controls with you the exact same amount. As you move the HUD moves.
The trick to getting the viewers position and orientation is the use of a large all encompassing Proximity Sensor (large 540K book chapter reference). The Proximity sensor generates events as the user (inside of the sensor) moves which are the position and orientation of the current camera position (the viewer).
One of the best places to get information on the specifics of HUDs is (of course) Bob Crispen's VRML FAQ. In particular in the Techniques section he points to a two HUD examples. The example by Chris Founts is heavily commented and is a great place to learn this stuff. The second example by "Flounder" (whoever the hell he/she is?) is cool cause it displays the x y z position of the viewer as the HUD.
A more elaborate HUD is used by Bob Lipman based on the heads-up-display proto for the Controls is based on the front panel proto by Thomas Kolenda. This HUD is really terrific, it can be moved and resized.
The use of HUDs allows virtual world designers to eliminate the existing built in control panel of the browser (setting the NavigationInfo type to "NONE"). Custom controls are often simpler for users to navigate and specific to the application at hand, so HUDs away!
One Year Ago in Focus on Web3D (VRML) PageFX a 2nd Generation VRML Authoring Tool
Subscribe to my
newsletter and JOIN the club!