If you include a viewpoint in a mall item, it must be intrinsic to the purpose of the item (i.e., if you make a jet plane, you could include a viewpoint in the cockpit, or if you have a carnival ride, you can include a viewpoint that lets someone get on and ride).
If you create a bind to the viewpoint, the user must be able to walk away and unbind from the viewpoint. This is because new users may not be familiar with bound viewpoints, and may not know what to do when they are dragged away against their will. You can use a ProximitySensor to bind and unbind the user from the Viewpoint.
Here's a very simple example.
bindViewExample.wrl, bindViewExample.spz
When you open bindViewExample.wrl, you are riding the exciting Box that Goes By Cone, Cylinder and Sphere ride. Wheeeeee!
But more than that, your avatar is bound to the viewpoint that's following the cube.
After you've thrilled to the colors and shapes for an hour or so, you might get bored. That's okay. Just walk away. Once you move away from the cube, your viewpoint is no longer bound, and you can navigate normally. When you approach the cube again, you are bound to the cube once more.
Here's an aerial view of the ride.
The aqua square is the ProximitySensor. I set it to 7x 3y 7z in size (with the bottom at zero). The ProximitySensor is used to start and stop the animation (named Wizard) that moves the Group (named theRide) consisting of the Viewpoint node and the Box.
.
Using the same sensor, I added a trigger for the viewpoint. I set it so that when the Sensor region is entered, the Viewpoint (viewFromTheBox) binds to the user's avatar. The viewpoint is animated along with the cube, so when the viewpoint is bound to the cube, you are whisked off on a thrilling ride.
To let you get off the ride, I just have to create another trigger that says when you leave the region, your node should Unbind.
That's all there is to it.
Summary:
Back to Creating Objects for Cybertown
Send your comments on this page to Epistomolus.
Updated February 23, 2007