Hi group,

some more information:

> I need a 'slide along the wall' behavior when moving the avatar
> nearly parallel to the wall, so I DON'T use PickRay/PickSegement,
> ...
> - PickConeSegment and PickCylinderSegment: with the TriangleStrip
>   the collisions were reported correctly. With the Quads the picks
>   looked exactly like using PickSegment, the more parallel to the
>   wall the nearer one could approach, neither spreadAngle (for
>   PickCone) nor radius (for PickCylinder) seemed to be respected.
>   This, when testing in the middle of the wall. Near the edges
>   the picking was slightly better, but not really correct.

I changed the Quads to TriangleStrips and had to notice the SAME
problem. Each wall was built from just 2 triangles, the walls length
is about 14 meters, the PickCone's length is about 1 meter (see my
_lovely_ ascii art (top view) here :-)

+----------------------------------------------------------------------------------+
       +----+
        \  /
         \/

I then subdivided the wall in the middle (giving me 4 Triangles):

+-----------------------------------------+----------------------------------------+
                                       +----+
                                        \  /
                                         \/

and suddenly the PickCone behaved much better around the middle
(and, as mentioned, around the left and right edge)!

I added code to visualize the nearest intersection point with a little
sphere, and could see, that the picking code preferres the internal
Geometry edges (the edge between the lower and upper middle vertex
and the outer vertical edges).

Subdividing even more to 4 and then 8 gave better and finally
satisfying results (14 meters / 8 = 1.75 meters, thus the 1 meter
long Cone can obviously 'see' the subdivision edges, but not the
plane(s)).

I consider this a bug in J3D 1.3 beta2:

  The PickCone/PickCylinder intersect/pick code seems to do
  it's angle/radius checks not against polygon PLANES, but polygon
  EDGES, which is clearly far from what users can expect and learn
  from the docs! And I would be unhappy, if the DOCS were changed,
  as you might guess.

I would rate this bug high in the current excellent state of J3D,
as reliable collision detection/avoidance is essential to most
interactive 3D development.

regards

Georg
 ___   ___
| + | |__    Georg Rehfeld      Woltmanstr. 12     20097 Hamburg
|_|_\ |___   [EMAIL PROTECTED]           +49 (40) 23 53 27 10

PS1: I had a glance (of several hours) over part of the intersecting
     code (not too sorry to JAD a little bit), it's overwhelming ...
     and my appreciation to the J3D team to get that working at all!!!

PS2: The practical problem is: one really CAN'T subdivide every
     Geometry to be near avatar size:
     - the polygon count increases HEAVILY, dropping the frame rates,
       just to get collision detection, when all other things work
       well with the coarse Geometry
     - loaders typically are constrained to read in, what they get
       and not to invent new geometry vertices, only for collision
       detection purposes

PS3: I consider the 2 other before (last mail) mentioned problems
     as bugs too:
     - PickBounds seems to have the same EDGE vs. PLANE problem
     - PickCone with an angle of PI/2 behaves simply WRONG

// EOF

===========================================================================
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".

Reply via email to