All Questions
14 questions
0
votes
1
answer
152
views
Predict future position of a moving body in Phaser arcade physics
I am looking for an equation for predicting the future position of a moving arcade physics body in Phaser 3. The body has drag applied and isDamping set to true. Phaser applies the drag using the ...
0
votes
1
answer
767
views
Why is my player still moving down when I set its gravity to 0?
I'm writing Lode Runner like platformer game. I'm trying to solve player sprite slowly moving down when on ladder by setting player.body.gravity.y = 0. I have ...
0
votes
0
answers
505
views
Client side prediction in 2D rigid-body physics
I'm currently working on 2D rigid-body physics multiplayer game using Matter.js for physics (both the client and server side) and Phaser3 for rendering. Both the server and the client run the ...
1
vote
2
answers
634
views
Detecting overlap with Phaser P2 physics
In a 2D platformer, I'd like to implement a ladder. I have collision working between the player and ground tiles. Now I would like to be able to detect when the player walks through a ladder tile (...
0
votes
1
answer
663
views
Rotating a group of bodies in Phaser
I want to create a game where enemies spawn, fly toward the player's ship, and stick to the side of it. The player can then rotate the ship and the stuck enemies will rotate with it.
The way I have ...
1
vote
0
answers
219
views
Multiplayer client-side physics
I'm trying to handle all the physics on the client and correct data on the server.
e.g.
...
1
vote
1
answer
172
views
In PhaserJS, how do I get a clicked Physics.P2 body's data?
I have a sprite with Phaser.Physics.P2 enabled, using a custom shape loaded with loadPolygon() from a ...
0
votes
1
answer
3k
views
add physics to a group or container body in phaser
I'm developing a HTML5 Phaser game. In this game I do have a Group which I would like to behavior as a physics body (arcade-physics).
It is a character with a lot of moving parts (sprites) inside ...
6
votes
4
answers
2k
views
Rotating sprite around another sprite
I am building a pool game, and I want to make the cue rotate around the white ball.
Here is the live code:
http://199.26.84.223/nocol.html
Here is the code for the white ball:
...
3
votes
1
answer
159
views
Collision happens even though the objects are not colliding according to what we see
I'm trying to build a pool game as my first phaser project.
The biggest challenge today was to make the cue rotate around the white ball. After hours of searching and not finding anything useful (...
5
votes
1
answer
3k
views
Switching from Arcade to P2 physics in Phaser
I just started using phaser for testing purposes. I've followed the tutorial from the phaser website ("making-your-first-phaser-game") everything is clear, so far no problems.
But since I'm ...
0
votes
1
answer
569
views
Custom arcade physics rate (e.g. bullet time)?
Is there a way to modify the rate that physics is applied, either globally or on a per-sprite basis in Phaser? That is, how can I slow down or speed up the rate at which sprites move around, or fall ...
1
vote
1
answer
484
views
How can I implement smooth digging effects in a tile-based game?
I'm trying to make a Dig Dug styled game where you will be digging into a material. This is going to be a tile-based HTML5 game and I have decided to use the Phaser framework.
One way to do the ...
1
vote
0
answers
432
views
How do I combine multiple squares into one Tetris block?
I am learning Phaser by making a simple game—Tetris. I'm having difficulties:
Can I use simple rectangles as tetrominoes or they should be sprites? I don't know how make the figure's block from ...