Quantcast
WoWInterface - View Single Post - PlayerModel:SetDisplayInfo
View Single Post
07-03-16, 02:49 AM   #60
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by semlar View Post
I only skimmed over that giant block of text they wrote because I'm practically illiterate, but if I understand the gist of the problem they can't scale the model properly because they don't know what it is since blizzard removed GetModel, which is absurd because they have the unitID and can get the race from that.
How is that gonna help on a totally random model i want to draw ont he screen? Also every model has different camera postions, i just want to get the proper values to manipulate the camera angles further.

Lua Code:
  1. function GetBaseCameraTarget(model)
  2.     local modelfile = model:GetModel()
  3.     if modelfile and modelfile ~= "" then
  4.         local tempmodel = CreateFrame("PlayerModel", nil, UIParent)
  5.         tempmodel:SetModel(modelfile)
  6.         tempmodel:SetCustomCamera(1)
  7.         local x, y, z = tempmodel:GetCameraTarget()
  8.         tempmodel:ClearModel()
  9.         return x, y, z
  10.     end
  11. end