View Full Version : Once again, gluUnProject...
09-07-2001, 11:15 PM
There seems to be about a million topics on this, but none of them have helped one bit for what i need http://www.opengl.org/discussion_boards/ubb/wink.gif. I've gone back to a simple example... draw a 10x10 plane through the y axis (ie the x & z axis), and then draw a rectangle on that plane where the mouse clicks it. For some reason the values returned by gluunproject are always incredibly off... i can click the origin (which the plane is centered around) and it will report something like -900, -1400, -50 ... does anyone have some example code or be willing to write some example code that will do the above example? I'm sure there'd be a LOT of other people who would greatly appreciate it http://www.opengl.org/discussion_boards/ubb/smile.gif (and ause it's starting to drive me nuts.. http://www.opengl.org/discussion_boards/ubb/wink.gif)
see my site (profile) under demos
09-08-2001, 03:02 PM
I assume you're referring to the selection buffer tutorial with several objects? Strangely, no matter where i click, the blue sphere attaches to my mouse cursor and pulses in size... I should mention that i've had BIG problems in getting the selection buffer to work... it just wont return the correct values. No matter what simple demo i run, it wont return the correct object.
I'm starting to think that maybe it's my video card's opengl drivers (I'm running a Kyro 2 on very newish drivers), so perhaps they aren't relating well with things... I may put an old tnt2 in to check how that goes with things.
hmm i just tryed the demo out + it worked
theres a few other demos on the net eg i saw this one today on flipcode http://www.lighthouse3d.com/opengl/
but it prolly also wont work, i believe there prolly is a problem with your drivers.
u can do the picking yourself in software , it will work on all cards + most likely will be quicker.
just run a ray from the viewers position through the cursors position and check to see if that ray intersects with any objects in your scene
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.