supereggbert / GLGE

A javascript webGL graphics library
http://glge.org
Other
394 stars 84 forks source link

Picking not working #77

Closed krojew closed 12 years ago

krojew commented 12 years ago

There is some kind of bug with picking. In a scene with 1 object at [42, -17, 10] which is a mesh of 2 triangles making a rectangle facing +z (no rotation) with positions (-4.4, -3.15, 0) to (4.4, 3.15, 0), picking doesn't find that object. Data from gl.readPixels(0, 0, 8, 1, gl.RGBA,gl.UNSIGNED_BYTE, data); is all set to 0. Picking in general works fine, but not in this case. I don't know the algorithm behind picking, so I cannot fix it myself. Any clues?

krojew commented 12 years ago

Oh, the camera is at [0, -140, 90] with rotX = 0.95.

krojew commented 12 years ago

I can confirm picking is working. Thanks!