Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Math
/
Distance
Phaser 4.1.0
Phaser 4 examples
Distance
4
examples
Examples
4
Distance Between Points
Demonstrates using Phaser.Math.Distance.Between to calculate the distance between two moving points and using that value to draw a dynamic circle.
Distance Between Points
Calculate the distance between two objects and visualize the result by drawing a circle with a radius equal to that distance.
Get Chebyshev Distance
Calculate the Chebyshev distance between two points—the maximum separation along any single axis—and visualize the result as a square bounding box.
Snake Distance
Demonstrates how to calculate the Snake (Manhattan) distance between two points using Phaser.Math.Distance.Snake.