Jump to content

Area on another Z plane


Recommended Posts

Posted (edited)

Hey all, currently debugging some Area code.

	Position[] possArr = {new Position(x1, y1, 1), new Position(x2, y2, 1) etc ...};	
	Area areaPoly = new Area(posArr);

	@Override
	public void onPaint(Graphics2D g) {
		List<Position> posList = areaPoly.getPositions();
		g.setColor(Color.BLACK);
		
		boolean bool = areaPoly.contains(myPlayer());
		
		g.drawString(Boolean.toString(bool), 10, 20);
		
		for (Position pos : posList) {
			g.draw(pos.getPolygon(getBot()));
		}
		
	}

The area is being drawn but on the z=0 plane. My boolean displays true on the 0 plane, but false on same spot on the 1 plane.

Any workarounds?

Edited by Athylus

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...