Added pivot point logic
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user