OpenGL and gluUnProject, 3d object following mouse

Posted by Robert on Game Development See other posts from Game Development or by Robert
Published on 2013-06-23T20:47:13Z Indexed on 2013/06/24 16:39 UTC
Read the original article Hit count: 338

Filed under:
|
|

i have a 3d object and i want him to "follow" my mouse position, so i use gluUnProject function to convert screen coordinates to 3d world coordinates and i translate this object with the new coordinates.

Its working but i have a problem, my object can follow my mouse but he is moving extremely fast, when i move my mouse a little bit(something like 2 pixels), its moving extremly fast in the 3d world.

I want something like that : http://www.youtube.com/watch?v=90zS8SVUAIY (red circle following mouse). Thanks for your help.

© Game Development or respective owner

Related posts about opengl

Related posts about 3d