well i have how to get the point of the hinge... now i just need to figure out how to translate that into code that rotates around that spot
--pass in -1 / 0 / 1 on the x,y,z depending on the direction of the hinge from the origin
function getHinge( p, x, y, z, xa, ya, za )
-- first rotate offsets
local dims = dimensions[ g_Entity[p].obj ]
local xo, yo, zo = U.Rotate3D( (dims.w/2)*x, (dims.h/2)*y, (dims.l/2)*z, xa, ya, za )
local x,y,z = GetEntityPosAng(p)
--add the offset to the origin point
return x + xo, y + yo, z + zo
end