Jump to content

drawing entity model?


Swizzbeat

Recommended Posts

graphics.fill(GraphicUtilities.getModelArea(bot, entity.getGridX(), entity.getGridY(), entity.getZ(), entity.getModel()));

 

Ah ok, I saw this which is what I was using. I guess both ways work :P

 

GraphicUtilities.drawModel(this.bot, g, npc.getGridX(), npc.getGridY(), npc.getZ(), npc.getModel());

2d668ca7db41b3d9696988b7d07ec2bd.png

 

this draws the actual model, you can draw the outline of the entity as well:

2e351c3fbbea6963e099a128658df1b1.png

 

and using your way will result in the entire area being filled. The main difference is drawModel will draw the in game model, where your way will fill in the entire area occupied by the entity.

  • Like 1
Link to comment
Share on other sites

Ah ok, I saw this which is what I was using. I guess both ways work tongue.png

 

GraphicUtilities.drawModel(this.bot, g, npc.getGridX(), npc.getGridY(), npc.getZ(), npc.getModel());

2d668ca7db41b3d9696988b7d07ec2bd.png

 

this draws the actual model, you can draw the outline of the entity as well:

2e351c3fbbea6963e099a128658df1b1.png

 

and using your way will result in the entire area being filled. The main difference is drawModel will draw the in game model, where your way will fill in the entire area occupied by the entity.

Yeah I've already done all this messing around with the different graphics methods :p

Link to comment
Share on other sites

How did u draw the outline? tongue.png looks nice

 
In your onPaint method just add this in. You can change the color to whatever you like, and instead of player you can use any entity. :P   
 
    @Override
    public void onPaint(Graphics2D g){
        player = myPlayer();
        g.setColor(Color.CYAN);
        if(player != null){
            g.draw(GraphicUtilities.getModelArea(this.bot, player.getGridX(), player.getGridY(), player.getZ(), player.getModel()));
        }
    }
 

 

Will produce this: 

c2f0bdaf5b90cec1e1a737147f3ff199.png

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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