How do I make the range of buttons available roughly match the size of the model
PHP Code:
float min[3], max[3];
GetEntPropVector(crate, Prop_Send, "m_vecMaxs", max);
GetEntPropVector(crate, Prop_Send, "m_vecMins", min);
float center[3];
for(int i; i < 3; i++) center[i] = (max[i] + min[i])*0.5;
// PrintToChatAll("center:%.2f %.2f %.2f ang:%.2f %.2f %.2f", center[0], center[1], center[2], ang[0], ang[1], ang[2]);
SetEntPropVector(button, Prop_Send, "m_vecMins", min);
SetEntPropVector(button, Prop_Send, "m_vecMaxs", max);