/** Whether X and Y pointer is inside object */ public boolean isOverlap(int X, int Y) { if (absolute) { return ((InsUtil.Absolute(X - this.getMiddleX()) <= (this.size.width / 2)) && (InsUtil.Absolute(Y - this.getMiddleY()) <= (this.size.height / 2))); } else { return ((InsUtil.Absolute((X - this.camera.position.x) - this.getMiddleX()) <= (this.size.width / 2)) && (InsUtil.Absolute((Y - this.camera.position.y) - this.getMiddleY()) <= (this.size.height / 2))); } }