ok, i'm using picking for collision avoidance....so I have a big room 200x300 meters and I start in the middle of it.
I just implemented collision detection with the help from andrews book...but i have some problems with it...
i use: picker.setShapeRay(start, vStop) where start is the Point3d where the kamera currently is and the vStop is the movement vector, where I suppose to move next frame. vStop is in this case (0.0, 0.0, -0.1) so..the pickray should go from the camera...0.1 units forward on the z-axis...
The problem is that I must have done something wrong since I can't move. I used System.out.print(picked); Where picked is PickResult picked = picker.pickClosest();
so, when I write out the picked object, i get this message every fram i try to move (of course the values are different, depending in which direction i try to move):
PickResult: sgp:[EMAIL PROTECTED] : javax.media.j3d.Shape3D [EMAIL PROTECTED]
LocalToVWorld Transfom: 1.0, 0.0, 0.0, 0.0 0.0, 1.0, 0.0, 0.0 0.0, 0.0, 1.0, 0.0 0.0, 0.0, 0.0, 1.0
node:[EMAIL PROTECTED]
PickIntersection: geomIndex = 0 dist = 100.0 ptVW:(-100.0, 0.0, 2.41421...)
this last one ptVW seems to be the location where the wall is...and the distance to the wall seems to be the right one..but how can get an intersection so far away, when my pickray is only o.1 units???
thank you very much for the help
Flavius
_________________________________________________________________ Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/
=========================================================================== 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".