Original Post
I'm working on a 3d version of a 2d board game, in which square tiles can be placed onto a board made up of square spaces (in the 3d version the board squares can be oriented vertically and upside down as well as flat like in the 2d version you play on a table). The board squares are coloured quads, and the game tiles fit within a board square, but are made up of a number of sub-objects which are just a selection of coloured triangles. I want to be able to pick these sub objects with the mouse, and I've set up the openGL name stack to do this. The board squares are drawn by feeding absolute coordinates into glVertex3fv(), and their names work fine - picking of board squares is accurate from any viewing position and orientation. The game tiles are drawn relative to the corner of the tile, and are shuffled into place using glTranslatef. When drawn to the framebuffer the tile appears in the correct position, but picking only seems to work accurately when the tile is placed at the origin. Applying a small translation to it causes the picking to shift off to the side, and apllying a large translation means I can no longer locate the place where the tile is picked since it so far from where the tile actually appears. What part of the pipeline could be causing this effect, given that the board squares work fine from any angle? My code is a bit scattered, and it's written in Python - I'm happy to post some relevant snippets if no-one can guess the problem from the description above. Any help much appreciated, thanks.