How to set world boundaries in Phaser for environment

In the Phaser framework, I can set the boundaries of the world using:

this.game.physics.p2.setBounds(90, 90, 400, 400, true, true, true, true, false);

      

This will make the borders of the world rectangular. I need, however, to make a circle on a global scale (I have a drum in which I want the balls to "jump"). One of my ideas (unless a more elegant solution is found) is to create a bunch of static objects around the drum image (similar to this example ), but I would like to avoid this if possible, so if anyone knows, how to solve this help will be appreciated.

+3
phaser-framework


source to share


No one has answered this question yet

Check out similar questions:

2
Phaser and problems with frame resizing on the fly
2
Prevent the subject from leaving the camera
1
Phaser 3 Weapon Plugin
1
How to customize timer animation in Phaser?
1
Phaser js collides with world borders
0
How do I show the current time in a Phaser structure?
0
How to add sprites around the perimeter of a circle to phaser frames
0
Phaser isometric map. How to set its boundaries?
0
Phaser: remove the circle previously drawn with drawCircle
0
Setting world boundaries in Phaser JS



All Articles
Loading...
X
Show
Funny
Dev
Pics