Kent,
the problem you had was because of old TBGL, that is why I mentioned necessity to update it in the original post. New release allows specifying single factor for scale, as it is the most used scenario and saves some coding. The equivalent of:
TBGL_EntitySetScale(%sScene, eBoid, Rndf(1, 1.1))
is in old TBGL something like this:
DIM factor AS Number = Rndf(1, 1.1)
TBGL_EntitySetScale(%sScene, eBoid, factor, factor, factor)
Thanks for trying and for the comments, you are right it is not visible very much, I made it even harder by using fog But I liked the feeling when the fishes are almost invisible, then change direction and thanks to specular material their bodies shine in the light from the dark.
Charles - thanks! I am sure it could get serious performance boost using Oxygen, as it uses lot of loops. With bigger number of fishes it becomes a bit slow here.
The use of this technique is not limited to fishes, but also to birds, sheeps (and other animals organised in "hordes") + for example for part of movement AI in FPS or strategy games, where group of characters travel through environment.
Petr
Bookmarks