I'd be tempted to do it this way:
(1) Give each fish a destination it's going to (might include staying still).
(2) Plot a path to that destination using its desired route (straight, meandering, etc).
(3) Use a simple version of the tank, with low-polygon geometry and fish to run what-ifs for 2-3 time advance periods to look for collisions. (All done by DX.)
(4) If a collision is detected consider another route for one or both of the fish.
(5) Perhaps use a higher resolution model for +1 frame time movement.
John
|