It's just very difficult to come up with an all-encompassing algorithm that fits any situation. It will probably have to patched together out of many different algorithms. Right now, I've got a routine in which a fish would move forward until it hits an object, stop, move up a little, try again. This gives the effect of pecking at the coral, and in many instances looks very good. But not ALL instances, so I need about a zillion conditional statements to determine which avoidance behavior to use in many different situations.
|