IKStreamIvo Posted May 7, 2018 Share Posted May 7, 2018 I have a sprite using (arcade) physics and I'm setting velocity to move around. When the player overlaps with a weapon, you can press a key to pick it up. I want the gun to be at an offset-ed position to the player and follow it around.. I thought parenting it was the easiest, but I can't figure out how to do it. Can anyone help me with this? ? Link to comment Share on other sites More sharing options...
kollehel Posted May 7, 2018 Share Posted May 7, 2018 You can use the Container introduced in Phaser 3.6.0. You can read about it in the Phaser World issue #120. https://madmimi.com/p/2c1afb IKStreamIvo 1 Link to comment Share on other sites More sharing options...
snowbillr Posted May 7, 2018 Share Posted May 7, 2018 Expanding on @kollehel's answer a little bit, there is no `parent` or `addChild` parts of a Sprite anymore. IKStreamIvo 1 Link to comment Share on other sites More sharing options...
IKStreamIvo Posted May 7, 2018 Author Share Posted May 7, 2018 1 hour ago, kollehel said: You can use the Container introduced in Phaser 3.6.0. You can read about it in the Phaser World issue #120. https://madmimi.com/p/2c1afb 40 minutes ago, snowbillr said: Expanding on @kollehel's answer a little bit, there is no `parent` or `addChild` parts of a Sprite anymore. Thanks so much! Link to comment Share on other sites More sharing options...
Recommended Posts