martinzwigl

08-30-2001, 02:45 AM

hi, folks, me again - sorry

i try to do some collision detection in delphi. (camera against plane = triangle) i try to use the "usual stuff" PointOnPlane with norm-vector and planshift. then rayintersection and then add up the angles between intersect-point and triangle (dotproduct of uni-norm-vectors 2PI to Sum of Angles and Tolerance)

For Rayintersection i use Camera-position as ray origin and as ray direction i use the direction i am looking at.

raydir<0>= sin(lookat)*scal

raydir<1>= camera-position<1>

raydir<2>= cos(lookat)*scal

but, when i add up the the angles i always end up with apx. 4,6666 instead of 6,28. anybody some ideas what i could be doing wrong. i am pretty sure that Pointonplane works and i am pretty sure that add of sum works right. its only rayintersection i am not quite sure what it really does.

thanks guys, you are always great help,

martin

i try to do some collision detection in delphi. (camera against plane = triangle) i try to use the "usual stuff" PointOnPlane with norm-vector and planshift. then rayintersection and then add up the angles between intersect-point and triangle (dotproduct of uni-norm-vectors 2PI to Sum of Angles and Tolerance)

For Rayintersection i use Camera-position as ray origin and as ray direction i use the direction i am looking at.

raydir<0>= sin(lookat)*scal

raydir<1>= camera-position<1>

raydir<2>= cos(lookat)*scal

but, when i add up the the angles i always end up with apx. 4,6666 instead of 6,28. anybody some ideas what i could be doing wrong. i am pretty sure that Pointonplane works and i am pretty sure that add of sum works right. its only rayintersection i am not quite sure what it really does.

thanks guys, you are always great help,

martin