Hi,
no no, the GLSelect result is always the Arrow, because the Arrow is always on top (Rendered after all other Objects without DepthTest).
Au''revoir,
Aya~
gluUnProject
Just thought i''d let you know that I just wrote and posted a tutorial on gluUnProject on my site. People ask about it often enough. Its strange what you do sometimes at 2am.
Kazade.
Hyperdev
"To err is human, to really mess up requires a computer"
Kazade.
Hyperdev
"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
Lukerd: nice tut but one minor error
in you complete overview you wrote:
winY = (float)viewport[3] - winY;
winX = (float)mouse.x;
winY = (float)mouse.y;
just change it to:
winX = (float)mouse.x;
winY = (float)viewport[3] - (float)mouse.y;
(that should theach you not to write any tutorial at 2am
)
in you complete overview you wrote:
winY = (float)viewport[3] - winY;
winX = (float)mouse.x;
winY = (float)mouse.y;
just change it to:
winX = (float)mouse.x;
winY = (float)viewport[3] - (float)mouse.y;
(that should theach you not to write any tutorial at 2am

don''t piss on an electrical fence
Hey Aya,
Just letting you know, I got the same thing you got - while dragging the object it moves faster than the mouse - I think corrupt is right - it''s a math thing.
Imagine you have a sphere of diameter 10 but the camera''s right in front of it. The total "y distance" of the screen might be only about 12 near the front of the screen, but then imagine walking backwards so that the sphere is far away and takes up maybe only 1/10 of the screen - back there, the "total y distance" would be more like 100.
What I think we have to do is project a ray from the front of the frustum to the line along which the object is being dragged, which for the simplest example would be the X axis or Z axis. gluProject might work for this.
I have to get back to work, but I hope this gives you a pointer - I''ll see if I can''t figure this out over the weekend.
Love means nothing to a tennis player
Just letting you know, I got the same thing you got - while dragging the object it moves faster than the mouse - I think corrupt is right - it''s a math thing.
Imagine you have a sphere of diameter 10 but the camera''s right in front of it. The total "y distance" of the screen might be only about 12 near the front of the screen, but then imagine walking backwards so that the sphere is far away and takes up maybe only 1/10 of the screen - back there, the "total y distance" would be more like 100.
What I think we have to do is project a ray from the front of the frustum to the line along which the object is being dragged, which for the simplest example would be the X axis or Z axis. gluProject might work for this.
I have to get back to work, but I hope this gives you a pointer - I''ll see if I can''t figure this out over the weekend.
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Oh yeah, thanks Corrupt. I''ll change it now, next time i''ll wait till the next day before uploading it, so I can check it when i''m awake.
Kazade.
Hyperdev
"To err is human, to really mess up requires a computer"
Kazade.
Hyperdev
"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement