Search the Community
Showing results for tags 'loadpolygon'.
Found 3 results
How can I check if two sprite are overlapping or not at a given moment if both of them has special shape with loadpolygon? (eg. crosshairs rectangle vs. enemy on a click) Do I need to use P2? Maybe the solution is obvious, but I am absolutely beginner in Phaser.
Hello, The loadPolygon method doesnt change when the shape of animation changes. var ship = game.add.sprite(200, 200, 'player'); ship.animations.add('fly', [0,1,2,3], 10, true); ship.play('fly'); game.physics.p2.enable(ship, true); ship.body.clearShapes(); ship.body.loadPolygon('physicsData', 'suu'); ship.body.fixedRotation = true; The loadPolygon is the same. How can i change the shape and the loadPolygon the same time?