Director 3D > Interaction in 3D


The key difficulty of designing a 3D interface is that we need an input device that can negotiate 3D – a mouse is by its very nature 2D! Another alternative is the keyboard.

Some interface solutions you might want to be aware of include

  • 3D Widgets (sample) – these are visual elements we manipulate with the mouse by grabbing, dragging, dropping, clicking, double-clicking, etc.
  • 2D dashboard (sample)

“Picking” means “to click on models on the 3D environment with the 2D mouse.” – basically, you need to find out if a model has been “picked” and then trigger custom handlers to force a change in the environment. Try clicking on one of the shapes below for example:

The Lingo used enables the models in this 3D cast member to receive and respond to mouse clicks. Setting up your 3D cast members to allow for picking models is an important part of including interactivity in your movie. With picking enabled, Lingo can detect which models a user has clicked in your 3D world. Additionally, picking Lingo can provide useful information such as the vector value of the model's location within the world, and which models a given ray intersects when cast from any point in the 3D world.

This is the code that actually handles the "picking" in the example above:

< Previous | Next >

July 2003