Search the Community
Showing results for tags 'loadPolygon'.
Found 3 results
Phaser3 load polygon
pancakegoescrazy posted a topic in Phaser 3Hello guys, what is the equivalent of this tutorial: http://phaser.io/examples/v2/p2-physics/load-polygon-2 in phaser3? I have some collision issues because my images/sprites are having a rectangular shape. After investigating possible solutions, I came across the loadPolygon function & PhysicsEditor but I do not know how to use loadPolygon function in Phaser3. Thank you!
overlap check overlapHow 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.
Change the shape and change the loadPolygon?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?