caesar Posted June 6, 2016 Share Posted June 6, 2016 hey i was wondering if a sprite could wrap around the world so i used this. game.world.wrap(circlebar, 0, true); and it works fine. but the problem with this is that the sprite leave the screen and then comes back around. is there a way the sprite could wrap almost like a snake following itself? where the beginning would start from the right side of the screen and the ending would still be moving to the left. thanks in advance. Link to comment Share on other sites More sharing options...
lewster32 Posted June 6, 2016 Share Posted June 6, 2016 No, because for a brief moment the sprite would have to be two sprites; one leaving the screen and one entering. With a bit of lateral thinking, using this knowledge of the necessity for multiple sprites (possibly as many as four, if the sprite moves over a corner of the screen for instance) you could probably create a clever way of synchronising the relative positions of duplicate sprites when a sprite begins to leave the screen. drhayes 1 Link to comment Share on other sites More sharing options...
Recommended Posts