Added pivot point logic

This commit is contained in:
2025-02-15 16:40:17 +01:00
parent 4c040c21d6
commit d8805dd775
3 changed files with 68 additions and 5 deletions

View File

@ -65,10 +65,10 @@ export function createTileArray(width: number, height: number, tile: string = 'b
export const calculateIsometricDepth = (positionX: number, positionY: number, width: number = 0, height: number = 0) => {
const backCornerX = positionX + width
const backCornerY = positionY + height
const sortingX = (positionX + backCornerX) / 2
const sortingY = (positionY + backCornerY) / 2
return sortingX + sortingY
}