View Full Version : Object manipulator

11-07-2011, 12:12 PM

I try to make a 3D manipulator in OpenGL, which allows to apply basic transformations like translations, rotations and scaling (e.g. manipulators in 3ds max or Maya).

I have already a basic manipulator which works fine for translations in the XY plane (thanks to gluUnproject) but when I make a rotation of the object, the manipulator doesn't work anymore (some problem of projection).

In fact, I would expect that the movement is constrained to the XY plane of the camera but I have no idea how it can be done (maybe with gluProject ?).

Anyone have an idea?

Thanks by advance.

11-08-2011, 03:41 AM

I don't think I can answer your question but I am interested in your use of gluUnproject() as I've been using this and can't get any sense out of it. Do you scale your z-values according to the zNear/zFar specified in gluPerspective()?

It's the problem with opengl - thousands of programmers continually having to reinvent the wheel to do the most basic operations!!