I just spent a few hours reading the code in the j3dfly example program. I found it very enlightening. In particular the collision detection technique is quite nice and flexible. Question1: The SimpleSweptVolume uses single rays from the eye location. If I am correct in my understanding of this, the limitations are that since the rays are from the eye, its possible the edge of the view will intersect geometry, even though the center of the view never will. To apply this to either an avatar or to make the view collision "better" I would need to two implementations: For avatar: Using an avatar bounding box I would use 4 rays in each direction, set at the corners. This would be a "conservative" check, as the bounding box would encompass space where there was no real geometry. For View (first person): I would need 4 rays front and back and the rest would stay the same. The four front and back rays would take into account the field of view to calculate the proper span. I would also need to improve VPDefaultCollision to loop through all the rays assigned to each direction, rather than just using [0]. Is that right? Question2: If I wanted to get the normal infomation from the collision to calculate a better "bounce" I would need to add a normal vector to RayCollision, and add the PickResult.getPointNormal() info to the RayCollision. Thanks for the excellent demo! Dave Yazel =========================================================================== 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".
