Swizzbeat Posted June 19, 2014 Posted June 19, 2014 (edited) How could I draw the model? I can get some of the points but there's also this weird line that appears... Edited June 19, 2014 by Swizzbeat
Swizzbeat Posted June 20, 2014 Author Posted June 20, 2014 What was it? graphics.fill(GraphicUtilities.getModelArea(bot, entity.getGridX(), entity.getGridY(), entity.getZ(), entity.getModel()));
DarkAngel Posted June 20, 2014 Posted June 20, 2014 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()); this draws the actual model, you can draw the outline of the entity as well: 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. 1
Swizzbeat Posted June 20, 2014 Author Posted June 20, 2014 Ah ok, I saw this which is what I was using. I guess both ways work GraphicUtilities.drawModel(this.bot, g, npc.getGridX(), npc.getGridY(), npc.getZ(), npc.getModel()); this draws the actual model, you can draw the outline of the entity as well: 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
DarkAngel Posted June 20, 2014 Posted June 20, 2014 Yeah I've already done all this messing around with the different graphics methods Why do you want to draw the models though? Its a waste of cpu if you ask me. :P
Swizzbeat Posted June 20, 2014 Author Posted June 20, 2014 Why do you want to draw the models though? Its a waste of cpu if you ask me. Color Jad for specific animations :p
Swizzbeat Posted June 20, 2014 Author Posted June 20, 2014 How did u draw the outline? looks nice I got the area using the GraphicsUtilities class and then did graphics.draw(area). 1
DarkAngel Posted June 20, 2014 Posted June 20, 2014 How did u draw the outline? 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: 2