Hi Daniel, This is due to numerical inaccurancy when the ray is tangent to the triangle. A suggest fix is modified the utilities
PickResult (source is included in the distribution) static boolean intersectRay (Point3d coordinates[], PickRay ray, PickIntersection pi) and change if ((uCoor[i] > 0) && (uCoor[j] > 0)) { etc. to if ((uCoor[i] > -delta) && (uCoor[j] > -delta)) { where delta = 1e-12 Bug 4712222 is submitted for this. Thanks. - Kelvin ---------------------- Java 3D Team Sun Microsystems Inc. >Date: Wed, 03 Jul 2002 12:37:37 +0200 >From: "Römer, Daniel" <[EMAIL PROTECTED]> >Subject: [JAVA3D] Bug? Picking not 100% accurate >To: [EMAIL PROTECTED] >MIME-version: 1.0 >Delivered-to: [EMAIL PROTECTED] > >Hello! > >I found out the Picking classes are very unreliably. For that i created a >little test case which is attached as source. I tried picking all vertices >of a primitive (Sphere with 1 Shape3D, 1 GeometryArray). There are 3 >possible results. First is a true hit where the aiming point equals the >geometry intersection point (red color). It is also possible that it is not >equal because of shadowing effects, which means aiming point at the backside >and intersection point at the front side (blue color). The last possibility >is that there is no hit at all at the primitive which normally could not >happen (yellow color). To understand the meaning of the colors I also >attached some screenshots of my scene. > >So the procedure for the testcase is to get a vertex point, do picking and >then decide for one of the three possible results. After that a little >sphere with the right color is attached at the picked vertex coordinate. The >green sphere represents the focal point of the picking. After a full cycle >you can see that the backside was correctly picked (blue color) because of >the shadowing. But at the front side there are many vertex points which have >a yellow color which meas that there is not hit! This not correct because >picking at a vertex coordinate must be always a hit. > >Now I don´t know If there is a reason for this and I am doing something >wrong or if it is a bug. Please someone would be so kind to take a look at >this? > >Many thanks, >Daniel > ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".