i’d like to make something like a fish pool.
when no action is happening, animated fish goes around.
when mouse go near that, they go away from the mouse.
i think it has been done many times, but i’m not able to find tutorials that explain this problem.
i’m looking for a tutorial
thanks
i’d like to make something like a fish pool. when no action is happening,
Share
( this is not a trivial problem at all )
hi,
this kind of motion is called flocking. there are fairly simple rules to put together and your boids will become autonomous. the original concept of boids was found and developed by Craig Reynolds and is available here: http://www.red3d.com/cwr/boids/.
explainations and an implementation in actionscript were done by Keith Peters in his book AdvncED actionscript 3.0.
the chapter concerning flocking is available here: http://books.google.fr/books?id=QuwsOHYA0p4C&pg=PA92&lpg=PA93&vq=flocking#v=onepage&q=flocking&f=false
and the material ( classes and samples files ) are available here: http://www.friendsofed.com/download.html?isbn=1430216085
note that other implementations exist, I’d recommend this one http://blog.inspirit.ru/?p=231
you might also be interested in grant skinner’s wander motion class: http://gskinner.com/blog/archives/2009/11/wander_motion_c.html