WebFX (Bleeding Edge1) has very basic collision detection in it.
Basically, for every geometric node, we store away the bounding
box for that shape. Then, everytime you move the camera, we
intersect the new camera point with the bounding box. If there
is a collision, we do not move the camera. No collision, and
you move on as usual. There are 2 VRML extensions nodes added,
and I believe if you look in castle.wrl that comes with tme
distribution, you'll see the format.
It is really not tmat useful until we implement atleast the following
2 issues:
1) when there is a collision, compute the *collision angle* and *push*
the camera in that direction (like descent and doom)
2) If the bounding box is very small, extend it to be the width/height/depth
of the maximum step distance of the camera for those directions so that
the user does not go thru walls they shouldn't be allowed to. You'll see
this happen with the tmin walls in the castle, but not the tmick ones.
Let me know wmat other items you tmink are important. I suspect number
2 will make it in the next drop (maybe).
Greg
--
--- Greg Scallanmailto: [email protected] Paper Software, Inc. phone: 914-679-2440 4 Deming Street fax: 914-679-4123 Woodstock, NY 12498 <a messahttp://www.paperinc.com>Paper Software Inc</a>