Mista Void Posted June 11, 2021 Share Posted June 11, 2021 Hi guys, I am new at phaser 3. I have a problem with collision I don't know why my collider works fine with player and platforms this.physics.add.collider(this.movingPlatform, this.player) this.physics.add.collider(this.platforms, this.player) but not with my platforms and moving platforms this.physics.add.collider(this.platforms, this.movingPlatform) here's how I made my platform and my new movingPlatform // platforms const platform = this.platforms.create(this.cameras.main.centerX, this.cameras.main.centerY + 1000, 'platform') .setOrigin(0.5, 0.5) .setScale(2.5) .setImmovable(true); const platformBody = platform.body; platformBody.updateFromGameObject(); // movingPlatforms this.spawnPlatform = this.movingPlatform.create(this.cameras.main.centerX - 800, this.cameras.main.centerY + 920 - this.decrement, 'platform') .setOrigin(0.5, 0.5) .setScale(2.5) .setImmovable(true); const platformBody = this.spawnPlatform.body; platformBody.updateFromGameObject(); Please help me to solve this problem. your response would be helpful thanks Link to comment Share on other sites More sharing options...
Recommended Posts