Search the Community
Showing results for tags 'bodies'.
-
How do I enable MatterJS based physics in my group bodies? I have the following: this.bullets = this.scene.add.group({ key: 'bullet', frame: 0, repeat: 5, maxSize: 10, setXY: { x: 32, y: 100, stepX: 40 } }); And I'm noticing the body value (at the bottom) is 'null' Based on this tutorial - https://phaser.io/tutorials/making-your-first-phaser-3-game/part8 It uses 'this.physics.add...' but unfortunately, 'this.physics' isn't available. Perhaps because I'm not using Arcade Physics? I also tried 'this.bullets.enableBody = true;' which doesn't seem to do anything. Thoughts?
-
I want two arcade physics bodies to single sprite, one is for horizontal collision and one is for vertical. can we do this? Advance thank you.