Skip to main content
gamedev.net
🔒 Locked

picking bug :/

Started by arczev 0 replies 650+ views
Original Post
arczev
arczev
I'm writing appliaction which is using picking, and I have a problem: glRenderMode returns wrong names of object clicked. My object are row of quads and each quad has own name. For example when I click on 2nd quad but near border with 1st quad It returns name "1" instead of "2". I tried to make this area near cursor very small: gluPickMatrix ((GLdouble) CursorX, (GLdouble) (viewport[3] - CursorY), 0.00001, 0.000001, viewport); but It doesn't change the situation. I use prespective like this gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,1.0f,1000.0f); and glTranslatef(0,0,-7); Thank u.
arczev
arczev
Cause when I use glOrtho istead of gluPerspective everything is correct.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.