View Single Post
09-22-19, 04:46 AM   #1
Alaror
A Murloc Raider
Join Date: Mar 2019
Posts: 6
Question PlayerModel:SetTransform bug

Alright, I've come across a really bizarre bug. Hoping someone can provide some insight cause I'm at a loss lol.

I'm trying to display some spell effects on the screen using the PlayerModel frame. I'd also like to adjust how it's displayed using SetTransform. What's going wrong is that when I initially enter the game (from the character select screen) the model won't display if I'm calling SetTransform. If I reload the UI using /reload it will display. Whenever I exit and reenter the game the same problem happens. If I don't use SetTransform the model displays perfectly fine immediately after entering the game without requiring a /reload.

To reproduce it I put together a test addon that has nothing but a single file with the code below. I also went ahead and disabled all the other addons in case one of them was causing a problem. It's still happening, but I figured it's worth having someone else try it out to see if it works for them. You should see a fire animation play in the middle of your screen.


Code:
local frame = CreateFrame("PlayerModel", nil, UIParent, nil)
frame:SetSize(500, 500)
frame:SetPoint("CENTER", UIParent, "CENTER")
frame:SetModel(1087046)
frame:SetTransform(0.1025, 0.1025, 0, 0, 0, 0, 0.1)
Thanks in advance for any help you can provide!
  Reply With Quote