Jump to content

Help!


Recommended Posts

Posted (edited)

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 feels.png

 

if you do however want to still try the polygon stuff it's 

 

titan.draw(treevariable.getPosition().getPolygon(getBot()));

Edited by Saiyan
  • Like 1
Posted (edited)

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 feels.png

 

if you do however want to still try the polygon stuff it's 

 

titan.draw(treevariable.getPosition().getPolygon(getBot()));

 

Thanks bro it works smile.png

 

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 by The King

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...