Chapter 18. Implementing 3D User Interaction

Click Tracking

After a 3D scene is on the screen, you may want to have it react to user clicks. But the cursor exists in the 2D space of the screen and the Stage. The models exist in a virtual 3D space inside the 3D member. So how can you tell what model appears at what screen location?

There are several ways to determine which 3D object the user clicked on. The simplest is to use modelUnderLoc. This function lets you determine which model is at a specific screen location.

Here is a behavior that uses modelUnderLoc to determine which model has been clicked on. First, you need to calculate ...

Get Special Edition Using® Macromedia® Director® MX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.