Results 1 to 4 of 4

Thread: picking and mouse motion

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    picking and mouse motion

    Can anyone give me any tips on how I can get picking and mouse motion to work? I have a scene where inside my house I have a teapot on a coffee table and a red stone on another table. Basically, my question is how do I approach this so that when I move over to each object, I can pick it up and look at it(rotate it around etc.)

  2. #2
    Member Contributor
    Join Date
    Feb 2009
    Posts
    73

    Re: picking and mouse motion

    One simple way would be to have a limited number of objects that can be "picked-up" and rotated. Then allow the user to cycle thru these with the tab key; make the selected object flash red when selected.

    The you just supply the object to your generic "rotate_thing" function.

    This will save having to calculate screen coordinates for pointing and clicking, and hence be more "error & fool proof".

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2009
    Location
    AP, INDIA
    Posts
    1

    Re: picking and mouse motion


  4. #4
    Junior Member Newbie
    Join Date
    Dec 2009
    Posts
    3

    Re: picking and mouse motion

    Thanks for the tip, but I'm having trouble pulling out the proper code from nehe's tutorials since all I've made is a simple 3D house and I just want to pick the "teapot" and "look" at it. The tutorial seems more geared towards a game.

Similar Threads

  1. Passive Mouse Motion
    By syan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-03-2005, 03:03 PM
  2. regarding mouse motion
    By moonie in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 06-04-2003, 07:27 AM
  3. Reading mouse motion
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-04-2003, 12:10 AM
  4. Mouse Motion input
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-18-2002, 09:33 AM
  5. Replies: 2
    Last Post: 11-14-2000, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean