How do you tell if a 3D surface (transparent or not) is touching another 3D surface?
There's a technique called Bounding Boxes, in which you set up the imaginary corners of a box around each object, then constantly test all those points to see if they are "within" another bounding box. Unless your objects are rather square to begin with, the boxes would be a pretty loose fit, preventing the objects from getting very close. Bounding Spheres are better for round objects, but what about something like a Finger Coral?
I actually have come up with a pretty good scheme, and was hoping to have a test version in the hands of the Alpha team last night. But there were some bugs that sent the fish hopping around uncontrollably, so it will take another day. (I will lose part of the day today, as it's our 26th anniversary, and my wife has two Shakespeare plays and a dinner planned.)
|