Click Animated 3D

I’ll make this short, does anyone have a way to replace DSpawnIcons’s with DModelPanel’s, or something that looks like a model panel? Ideally I would like to have animated model buttons but just taking off that lousy brushed steel background of the spawnicon is good enough.

Is there a way to use imagebutton with a model?
But really I would like to know if anyone has anything that could replace/emulate:
OnCursorEntered,
OnCursorExited,
and
DoClick, but for DModelPanel.
-Thanks for any help,
-Caro

Okay so I’ve managed to Get around this by placing a button on top of each modelpanel. However, the models are at wierd scales. Does anyone know how I could get the center and size of a model? (A model not a prop, all i have is a string that says, say – “models/Items/BoxSRounds.mdl” – or whatever.)

Yourmodelpanel.Entity is where you want to get the Center of

Yourmodelpanel.Entity:OBBCenter() i think

**[Entity.OBBCenter

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.OBBCenter)**
**[Entity.OBBMaxs

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.OBBMaxs)**
**[Entity.OBBMins

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.OBBMins)**

Got it, yeah commander was right. I was using the OBBMaxs and etc. functions but I had to make the entities first =p.

local Modent = ents.Create(“prop_physics”)
Modent:SetModel(Model)
ThreeD:SetLookAt(Modent:OBBCenter() + Modent:GetForward())
ThreeD:SetCamPos(Modent:OBBMaxs() - Modent:OBBMins() + Vector(0,0,15))

Now does anyone know how I would get darkrp to put buttons OVER the modelpanels instead of lining them up “for me” (it’s ignoring my telling it to SetPos(ThreeD:GetEntitiy():GetPos()))

EDIT: I’m an idiot, DModelPanels have the DoClick function as well as tooltips so there was never a need for buttons. However, see next subject:

Also: When the models start to take up space past the last row and so the models show over the edge of my panel until they are COMPLETELY off at which point they disappear, does anyone know how i could make a mask around the panel so that they couldn’t show over the edge of it?