Jump to content

Creating Groups with MatterJS enabled bodies?


Recommended Posts

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.


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...