October 21, 20169 yr how to make polygon near a tree or object something like this or like alek's woodcutter which has a square over the tree anyone have the code for it ? Edited October 21, 20169 yr by The King
October 21, 20169 yr get the position of the tree, make an instance of minimaptileDestination using that position and draw the destination
October 21, 20169 yr how to make polygon near a tree or object something like this or like alek's woodcutter which has a square over the tree anyone have the code for it ? Something like: graphics.drawPolygon(treePosition.getPolygon(getBot())) Edited October 21, 20169 yr by Explv
October 21, 20169 yr I tried making a polygon on the tree with the tree pos but it wasn't accurate and didnt cover/wrap the tree so if you want to do a bounding box or something instead it'd be something like titan.draw(treevariable.getModel().getBoundingBox(treevariable.getGridX(), treevariable.getGridY(), treevariable.getZ())); where titan. is my onPaint reference e.g (Graphics2D titan) treevariable is your tree variable you get the gist I tried mate, sorry if you do however want to still try the polygon stuff it's titan.draw(treevariable.getPosition().getPolygon(getBot())); Edited October 21, 20169 yr by Saiyan
October 21, 20169 yr From Alek's woodcutter (pieced together): GraphicUtilities.getModelBoundingBox(bot, o.getGridX(), o.getGridY(), o.getZ(), o.getModel()); g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
October 21, 20169 yr Author I tried making a polygon on the tree with the tree pos but it wasn't accurate and didnt cover/wrap the tree so if you want to do a bounding box or something instead it'd be something like titan.draw(treevariable.getModel().getBoundingBox(treevariable.getGridX(), treevariable.getGridY(), treevariable.getZ())); where titan. is my onPaint reference e.g (Graphics2D titan) treevariable is your tree variable you get the gist I tried mate, sorry if you do however want to still try the polygon stuff it's titan.draw(treevariable.getPosition().getPolygon(getBot())); Thanks bro it works From Alek's woodcutter (pieced together): GraphicUtilities.getModelBoundingBox(bot, o.getGridX(), o.getGridY(), o.getZ(), o.getModel()); g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height); Bro thanks for that but it didn't work with me correct me if i am wrong, 2d graphics is not working in the tree we need 3d. Edited October 21, 20169 yr by The King
Create an account or sign in to comment