View Single Post
11-16-18, 10:58 AM   #13
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
Are you suggesting to extract model file from game data and somehow add it into my addon as a separate model? I have no idea how to do that, honestly. Never even saw addon with custom 3D model, I thought that addons can only use built-in models.
That was my understanding as well. So, if the only animation you have successfully done in 3D is with the built in 3D objects then it goes to show that unless addons can use their own 3D objects their 2D objects will only rotate in 2D.

Actually there's remark at https://wow.gamepedia.com/API_Animat...reateAnimation "It appears that all animations involving moving a PlayerModel frame will fail silently. Alpha animations are the only animation type which will have any effect on these frames.".
Yes I saw the comment regarding that but seeing as you are wanting to rotate a non player frame it shouldn't apply. Of course, it could also mean any 3D frame rotation silently fails.

local ag = frame:CreateAnimationGroup();
local a = ag:CreateAnimation("Rotation");
a:SetDegrees(60);
a:Play();
Did this actually do anything ? My understanding is that it would rotate similar to the hands of a clock with a total of 360 degrees to complete the rotation. As in we only have control of the X and Y location with layering ( https://wow.gamepedia.com/Layer ) the only level of 3D like visualness we have with the UI.


If we look at the root of the PlayerModel and look at Model itself it may prove informative.
https://wow.gamepedia.com/Widget_API#Model
It gives the impression you can load your own models as long as they are of the right format.

Has anyone done anything similar that inspired you ? If so, maybe look at how they implemented their magic.


To be honest, I don't think you will better what the game already does with the icicle animation.

If you want to have a permanent display of your icicles I'd settle for the 2D images spaced out at a location that suits your gameplay and activate them when required and within the realms of in combat UI changes. With the built in icicle display doing the 3D animation stuff it already does.



Edit:

Tried playing with the Model frame but with no examples it made for a non successful result.


Edit2:
Tried the following block of code ..
Lua Code:
  1. local model = CreateFrame("Model")
  2. model:SetSize(100,100)
  3. model:SetPoint("CENTER")
  4. model:SetPosition(0,0,0)
  5. model:SetModel("Creature\\Arthaslichking\\arthaslichking.mdx")
  6. --model:SetModel("spells\\cfx_mage_iciclemastery_launchedmissile.mdx")
  7. model:SetLight(true, true, 0,0,1, 1000, 1,1,0)
  8. model:SetFacing(math.pi / 2)
  9. model:SetCamera(1)
  10. model:SetScale(3)
  11. model:SetFogFar(10)
  12. model:SetFogNear(0)

The Arthas model appeared ( black color only ) but the icicle model you provided ( with the mdx extension that they use for backward compatibility ) doesn't display or error. However, there is no rotation function but it is possible that rotation animation in combination with the SetPosition(x,y,z) may work. But this is a moot point if the icicle won't display using this model frame.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 11-16-18 at 12:37 PM.
  Reply With Quote