Problems with picking

New Message Reply Date view Thread view Subject view Author view

Douglas Soo (stimpy++at++media.mit.edu)
Wed, 02 Aug 95 14:30:17 -0400


I've got a strange problem with picking that I'm wondering if anybody has
ever encountered before:

The problem is that when I attempt to pick objects, you need to pick a
position that is rotated (or otherwise transformed) from the actual
position, in order to pick the
object.

Here's the code that I'm using to generate the channel view matrix:

  pfMakeIdentMat(view_matrix);
  pfPostRotMat(view_matrix, view_matrix, -90.0, 1.0, 0.0, 0.0);
  pfPostRotMat(view_matrix, view_matrix, hpr[PF_R], 0.0, 0.0, 1.0);
  pfPostRotMat(view_matrix, view_matrix, hpr[PF_P], 1.0, 0.0, 0.0);
  pfPostRotMat(view_matrix, view_matrix, hpr[PF_H], 0.0, 1.0, 0.0);
  pfPostTransMat(view_matrix,
                 view_matrix, xyz[PF_X], xyz[PF_Y], xyz[PF_Z]);

where hpr is just the heading, pitch and roll. The reason it's done this
way, as opposed to the standard way, is so with heading, pitch, and roll
equal to zero, the Z axis is the viewing axis.

Now here's the strange part: This only occurs under a very specific camera
position. If I rotate the camera just a small bit away from the Z axis
(around the x or y axes), everything works normally. If I rotate about the
Z axis, the transformation (or whatever it is) between the actual place
being picked and the position it seems to pick changes.

Any ideas on what could be going wrong? I'm assuming that I'm doing
something wrong with the channel view matrix, even though it seems to draw
correctly.

Thanks muchly in advance,

Douglas Soo
stimpy++at++media.mit.edu
Visible Language Workshop
MIT Media Lab


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.