Fix for object depths and proper depths for rotated objects

This commit is contained in:
2025-03-20 15:17:34 -05:00
parent 3f28d85c30
commit 2881d5f251
4 changed files with 29 additions and 9 deletions

View File

@ -62,8 +62,8 @@ export function createTileArray(width: number, height: number, tile: string = 'b
return Array.from({ length: height }, () => Array.from({ length: width }, () => tile))
}
export const calculateIsometricDepth = (positionX: number, positionY: number, pivotPoints: { x: number; y: number }[] = []) => {
return Math.max(positionX + positionY)
export const calculateIsometricDepth = (positionX: number, positionY: number) => {
return positionX + positionY
}
async function loadTileTextures(tiles: TileT[], scene: Phaser.Scene) {