Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-13-10, 12:15 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
need a 3D model expert

Working on the 3d models and i have a weird problem. i did a setmodelscale as well as tried using set position and both work fine when you log in but for some reason when you sheath/unsheath weapons or change armor the scale and position reset to default.

the code is small and simple right now....
lua Code:
  1. -- 3D model frame
  2.  
  3. local playerModelEventFrame = CreateFrame("Frame", nil, UIParent)
  4. playerModelEventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
  5. playerModelEventFrame:RegisterEvent("UNIT_MODEL_CHANGED", "player")
  6. playerModelEventFrame:RegisterEvent("PLAYER_LEVEL_UP")
  7. playerModelEventFrame:RegisterEvent("PLAYER_SKINNED")
  8.  
  9. GrimUI.playerModelEventFrame = playerModelEventFrame
  10.  
  11. local playerModelFrame = CreateFrame('PlayerModel', "playerModelFrame", playerModelEventFrame)
  12. playerModelFrame:SetHeight(175)
  13. playerModelFrame:SetWidth(200)
  14. playerModelFrame:SetPoint("BOTTOMRIGHT", GrimPlayerFrame, "TOPRIGHT", 0, 0)
  15. playerModelFrame:SetFrameStrata("HIGH")
  16. playerModelFrame:SetFrameLevel("2")
  17.  
  18.  
  19. playerModelEventFrame:SetScript("OnEvent", function(self)
  20.     playerModelFrame:SetUnit("player")
  21.     playerModelFrame:RefreshUnit("player")
  22.    
  23.     playerModelFrame:SetRotation(0)
  24.     playerModelFrame:SetPosition(-12, 0, -2)
  25. end)
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » need a 3D model expert


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off