Ok I had this idea to animate some grass but without actually changing the images. Instead I used the matrix:setElements to distort the image by shearing it. This has the effect of shifting the top of the image left or right by a few pixels whilst keeping the bottom fixed in place.
I used 3 sections of a texture page and placed 50 grass sections on the floor, these are then randomly sheared to give a nearly realistic grass blowing in the wind effect.
Comments are welcome.
Enjoy.
rar
rar
Comments
nice! scouser!
and run smooth even on my slow and old ipod 2^gen.!
also is a good example of matrix usage!
thanks!
www.tntengine.com
Likes: techdojo
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
I had the same idea when make my cat fishing game.
I planned to make a swimming animation by matrix, but it requires some tricks.
https://sites.google.com/site/xraystudiogame