I’am trying to make a platform that moves horizontally and carries the player around. I copied the code from phaser’s website thats supposed to help me. but I get an error from the console that
this.platforms = this.add.physicsGroup();
is not a function
this is the rest of the code but it won’t run either
this.platforms.create(0, 64, ‘platform’);
this.platforms.create(200, 180, ‘platform’);
this.platforms.create(400, 296, ‘platform’);
this.platforms.create(600, 412, ‘platform’);
this.platforms.setAll(‘body.allowGravity’, false);
this.platforms.setAll(‘body.immovable’, true);
this.platforms.setAll(‘body.velocity.x’, 100);