Jump to content

Paint an rs2object?


Recommended Posts

Posted (edited)

Can someone help me out?
 
Which method is Graphics2D allows for me to paint the wireframe of an RS2Object?

FIXED
 

I checked ObjectDebug, first you check if the object is visible on the screen:
 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

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

}
Edited by RickyD
Posted (edited)

GraphicUtilities.drawModel

Thanks!

 

But how would I use it to paint, lets say a bank booth?

Just going from memory here.. but try something like this

 

draw(obj.getModel().getArea(obj.getGridX(), obj.getGridY(), obj.getZ()))

It worked, but it spazzes out, drawing little fragments of it.  Never the whole booth

Edited by RickyD
Posted

Thanks!

 

But how would I use it to paint, lets say a bank booth?

I checked ObjectDebug, first you check if the object is visible on the screen:

 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

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

}
Posted

 

I checked ObjectDebug, first you check if the object is visible on the screen:

 

if(GraphicUtilities.getScreenCoordinates(bot,obj.getGridX(), obj.getGridY(), obj.getZ(), obj.getHeight()))[0] != -1) {

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

}

Yep that works.  I don't know how to read the ObjectDebug :(

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