How would you go about making a sprite follow another sprite in Phaser 3?
An example would be the parts of a snake in slither.io
In Phaser 2 there was the addChild
( see here ), which in Phaser 3 only exists for containers... There are many examples on how to accomplish this in Phaser 2, but I can't figure it out for Phaser 3...
Alternatively I could create my own Path array like in this example . But I am quite sure there should be an easier solution.
Sounds similar to my question here, String of moving sprites following the player, most efficient way to do it?
In the end I just used my own suggestion as mentioned in the opening question:
.update()
That is what I used in the final game ;)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.