Hello.
This is something i've been struggling with for a long time, and I don't know if maybe nowsdays there is a solution to the problem.
I'm trying to display models dinamically in a frame and I want the model to fit perfectly in the frame.
For example:
Lua Code:
local model = CreateFrame("PlayerModel", "mxpplayermodel", UiParent)
model:SetPoint("CENTER")
model:SetSize(120, 120)
model:SetCamera(1)
model:SetDisplayInfo(89822)
model:Show()
This will draw a human model that fits perfectly in the frame, however if I use the DisplayID 1698 that belongs to a gigant, it shows only a portion of its body.
I know I can change the camera distance scale to show it completely like this:
Lua Code:
local model = CreateFrame("PlayerModel", "mxpplayermodel", UiParent)
model:SetPoint("CENTER")
model:SetSize(120, 120)
model:SetCamera(1)
model:SetCamDistanceScale(4)
model:SetDisplayInfo(1698)
model:Show()
However... I don't know which models will require a modification of the camera distance scale and I don't want to check one by one and do a personal database with that information. Is is possible to solve this problem using other methods? or is it possible to know the model's size before showing it so I can adjust its scale?
Thanks.