yasdar 0 Report post Posted August 15, 2014 Hi,I'm trying to add a very little animation ( flying bird) to the background "tilesprite", the bird and the background have to move together.any idea how to do this ?Thank you. Quote Share this post Link to post Share on other sites
lewster32 616 Report post Posted August 15, 2014 I'd just create a normal animated sprite and in the update loop just keep its position updated to match the TileSprite, as animating the entire TileSprite just for one small part of it would be enormously inefficient.function update() { this.bird.position.x = background.tilePosition.x + originalPositionX; this.bird.position.y = background.tilePosition.y + originalPositionY;}Where originalPositionX and Y are the offsets where you want your bird to appear in relation to the TileMap. If the TileSprite loops, then just have something in place so that if it moves off the edge of the screen it's repositioned on the other side. 1 yasdar reacted to this Quote Share this post Link to post Share on other sites
yasdar 0 Report post Posted August 19, 2014 Thank you for help.work fine . Quote Share this post Link to post Share on other sites