• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Manipulators

Now we're going to add some manipulators to our scene that will allow the user to move the humanoid around in space and rotate it, using the mouse. These manipulator objects are very handy, since they do a lot of very difficult and complicated math for us. By holding down the first button and dragging the mouse around, the user will be able to rotate the humanoid. Holding down the second button and dragging the mouse will move the humanoid up/down and left/right. The third button will be used to move the humanoid forward and backward as the mouse is dragged up and down on the screen. On machines that have only a two-button mouse, or a mouse driver that supports only two buttons, the ALT key should be held down along with the first mouse button to achieve the effect of a third button.

These manipulators are part of the behavior utilities of Java 3D. To use them, we must import the appropriate classes:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint