Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: first person shooter with mouse look...

  1. #1
    Intern Contributor
    Join Date
    May 2003
    Posts
    50

    first person shooter with mouse look...

    i have set up my first person camera all perfect with the mouse but whenever mouse_x is 1024 (im running at 1024x768) or 0 you cant turn on the x axis anymore... and same with mouse_y (execpt 768 and not 1024), is there a way to make no limit to the mouse coords?

    ps. im useing the nehe code for mouse movment:

    Code :
    case WM_MOUSEMOVE:
    			{
    	            mouse_x = LOWORD(lParam);          
    				mouse_y = HIWORD(lParam);
    			}
    		break;

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: first person shooter with mouse look...

    I think the idea would be to reset the mouse position to the center of the window regularly (each time you poll it) and just measure the delta position each time yuo get a motion event.

    This will require a windows system call, and isn't really related to OpenGL.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Aug 2001
    Location
    Italy
    Posts
    628

    Re: first person shooter with mouse look...

    Excuse me, I don't understand.
    What are you doing?

    EDIT:
    Where's the problem?
    Is it a concidence those values are the same of resoultion? Are you trying to estabilish some relationship between the mouse movement and the resolution?
    I don't know the code you are using but this problem looks strange to me.

    [This message has been edited by Obli (edited 05-09-2003).]

  4. #4
    Intern Contributor
    Join Date
    May 2003
    Posts
    50

    Re: first person shooter with mouse look...

    i got it now, i just centered the mouse after every ever frame

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •