@Override
			public void controlObject(GObject target, Context context) {
				super.controlObject(target, context);

				final double tx = target.getX();
				final double ty = target.getY();
				
				final double iw = target.getWidth() / SIDE_LENGTH;
				final double ih = target.getHeight() / SIDE_LENGTH;

				final double minX = -iw;
				final double minY = -ih;

				if (tx > 0 || tx < minX) {
					double x = minX + tx % iw;
					if (x < minX) {
						x += iw;
					}
					target.setX(x);
				}
				if (ty > 0 || ty < minY) {
					double y = minY + ty % ih;
					if (y < minY) {
						y += ih;
					}
					target.setY(y);
				}
			}