picking question

hi,

I’ve setup picking as layed out in the red book and it works ok except for one problem. If I rotate or translate the scene around the picking point becomes disconnected with the object I’m picking. i.e. : if I have a cube in the middle of the scene and perform no rotations/translations it picks fine. if I then rotate/translate then I have to click to the right or left of the object to select it and in some cases the object becomes unpickable. before I post any code, is this a common problem with a common solution?

thanks
mr T

As long as the transformations are included in the code that’s rendered in selection mode, it should work OK.

Are you using gluPickMatrix()?

hi,

like I said, I’m doing it exactly like the red book, instead i’m using quadric spheres in perspective instead of squares in ortho. I’ve now noticed that the further away from the origin (i.e. 0,0,0) the object is, the bigger the gap from the picking point to the actual object. I’ve tried both Mesa3.5 and the latest nv drivers on a GF1 in redhat 7.1. This is driving me insane as I’ve tried other picking demos from romka etc and it still bloody does it!

please help, I’m reaching for the razor blade…

I always think people who reply to their own problems are a bit well… wierd.

I found the problem and its a strange one. If i replace the calls to gluPerspective() with glFrustum() it works perfectly! whats up with that?

Mr C Onfused.