Is there a way of detecting when the line (drawn by the mouse) has interseted both sides of the curve? The aim of my game is for the user to successfully cut the object using the mouse.[ ] let level4; window.onload = function() { let gameConfig = { transparent: true, type: Phaser.AUTO, scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH, parent: "thegame", width: 600, height: 700 }, scene: scene4, physics: { default: "matter", matter: { gravity: { y: 0 }, debug: true, } } } level4 = new Phaser.Game(gameConfig); window.focus(); } let levelText; class scene4 extends Phaser.Scene{ constructor(){ super(); } create(){ const graphics = this.add.graphics(); const path = new Phaser.Cur...
A site where you can share knowledge