Save actual Rectengle Hitbox Data

This commit is contained in:
2026-04-09 17:29:59 +03:00
parent f43795e1f4
commit 55aab3cac0
2 changed files with 10 additions and 6 deletions

View File

@ -108,7 +108,10 @@ public class HitboxRectangle extends Hitbox {
bottomPoint.y=currentPoint.y;
}
}
referencePoint.x = bottomPoint.x-owner.getImage().getWidth()/2;
referencePoint.y = bottomPoint.y-owner.getImage().getHeight();
bottomPoint = isometricToCartesian(bottomPoint.x,bottomPoint.y,bottomPoint);
Point cartesianCenterImagePoint= new Point(0,0);
cartesianCenterImagePoint = isometricToCartesian(owner.getImage().getWidth()/2,owner.getImage().getHeight(),cartesianCenterImagePoint);
referencePoint.x = cartesianCenterImagePoint.x-bottomPoint.x;
referencePoint.y = cartesianCenterImagePoint.y-bottomPoint.y;
}
}