Juggles Posted February 26, 2017 Share Posted February 26, 2017 Hello all, hope your day is going great. I am wondering if it is possible to get the coordinates inside of a position. For example, you have Position pos = new Position (x,y,z); Now I do pos.hover(bot); This will hover randomly within the position. I was wondering if there is a way to hover a specific point or range within the position. Thanks for your help Quote Link to comment Share on other sites More sharing options...
k9thebeast Posted February 26, 2017 Share Posted February 26, 2017 (edited) Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call. Position pos = new Position (1,2,3); if(pos.isVisible(bot)){ Polygon p = pos.getPolygon(bot); Rectangle bounds = p.getBoundingBox(); } Edited February 26, 2017 by k9thebeast 1 Quote Link to comment Share on other sites More sharing options...
Stimpack Posted February 26, 2017 Share Posted February 26, 2017 (edited) adding on to what k9thebeast suggested black is Rectangle, white is Polygon (more accurate) if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions). https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints if you want to mess around with the points Edited February 26, 2017 by Stimpack 1 Quote Link to comment Share on other sites More sharing options...
Juggles Posted February 26, 2017 Author Share Posted February 26, 2017 6 hours ago, k9thebeast said: Something around this I would say. You can either use the Poly or the Rectangle, I would suggest the Poly but your call. Position pos = new Position (1,2,3); if(pos.isVisible(bot)){ Polygon p = pos.getPolygon(bot); Rectangle bounds = p.getBoundingBox(); } 5 hours ago, Stimpack said: adding on to what k9thebeast suggested black is Rectangle, white is Polygon (more accurate) if you choose to use the Rectangle, clicking inside it will not always take you to the original position (could be adjacent positions). https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#npoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#xpoints https://docs.oracle.com/javase/8/docs/api/java/awt/Polygon.html#ypoints if you want to mess around with the points Thank you both! Quote Link to comment Share on other sites More sharing options...