Reputation: 1415
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.
Upvotes: 2
Views: 4590
Reputation: 3048
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 ;)
Upvotes: 2