Here is the example code from phaser3 tutorial. Per the tutorial, there are 2 scenes, one for the world map and the other for the battle. I doubt if the code above implement the battle scene. I assume the scene in question is the world scene. Moving (with arrow keys) the character one or two steps/tiles works well. Keep moving
Tag: game-physics
Formula to calculate time needed for a ball to reach destination where the ball’s x y is updated in a time loop
I am coding a simulation of ball movement. I have an updateBall function which runs every 100 miliseconds to update the location of the ball. How is the formula to find out the time in miliseconds needed to reach a given target coordinate? For example, given target x=100 y=200 the time needed to reach is approximately 5300ms. Below is the
How to detect overlap in Phaser.js?
I am new to Phaserjs, and I am trying to make a shooting game. I want the damage function to fire when a bullet touches plane2, that is the green plane. Can somone please tell me what am I doing wrong here? Here is my code: Here is the link to the game if needed https://shoot.abaanshanid.repl.co/ Answer This works: but