The unproject code from above returns the object coordinates before the transformation.
Sounds more like you want the world coordinates after the modelview transformation?
Just multiply the returned point by the modelview matrix then. Is that it?
(Sorry, for the confusing dWorldXYZ parameter names in my previous post. Should have been object coordinates.)
Waah x.x why doesn’t it work.
I now found the function
glMultMatrixd(dmatModelview);
you told me. But it doesn’t work.
Now I always get the same value on X and Z. Y is the pixelposition of the mouse like in a 2D game.
Or - if I move the position of the positioncheck I get a overflow.
Would you have a look on it when I send the code to you (It isn’t the longest currently and I would say you where to find what)
I really need it and I can’t find any examples or tutorials for it.