Thread Tools Display Modes
01-10-06, 10:05 PM   #1
syredronning
A Kobold Labourer
Join Date: Jan 2006
Posts: 1
SetFacing & SetCamera

I've tried modifying the following addon for World of Warcraft but I just can't get it to work as I want it to.

You can download the files here: (you can see the xml below...)
http://theleninmullet.org/3DUnitModelsReprise.rar

It's currently showing a 3D model of your target zoomed in at the head (SetCamera(0)).

What I want it to do though is having it facing the other way. So instead of facing southeast I want it to face southwest (because I have my own modelframe facing southeast and I want the two model frames (my own and my target) facing each other.) But I just can't seem to get this to work when the camera is set to 0 (SetCamera(0).)

If I add 'myTargetModelFrame_TargetModel:SetFacing(5.712);' (for southwest) in a new line below line 54 it just flickers the model to southwest in a flash (very fast) and then goes back to facing southeast and stays there.

If I remove'myTargetModelFrame_TargetModel:SetCamera(0);' in line 54 it shows a fullbody 3D model of my target. And I can then add a new line 54 containing 'myTargetModelFrame_TargetModel:SetFacing(5.712);' to make the fullbody 3D model face southwest. But I want it to zoom in at the head as well as facing southwest. I just can't get it to work when I add the 'SetCamera(0);' line to the mix - then it just keeps facing southeast (after the quick flash.)

Your help would be greatly appreciated.

Secondly, when showing the fullbody 3D Model is there a way to remove the "particles" (glow) of staffs etc. from the 3D model?

---------------------------------------------------------------------
<Button name="myTargetModelFrame" movable="true" parent="UIParent" hidden="false" frameStrata="LOW">
<Size>
<AbsDimension x="338" y="338"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Frames>
<PlayerModel name="$parent_TargetModel" hidden="true">
<Size>
<AbsDimension x="338" y="338"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Scripts>
<OnLoad>
this:RegisterEvent("PLAYER_TARGET_CHANGED");
myTargetModelFrame_TargetModel:SetSequence(30);
</OnLoad>
<OnEvent>
if (event == "PLAYER_TARGET_CHANGED") then
if (UnitExists("target")) then
this:SetUnit("target");
this:Show();
else
this:Hide();
end
else
this:SetUnit("target");
end
</OnEvent>
</Scripts>
</PlayerModel>
</Frames>
<Scripts>
<OnLoad>
this:SetScale(.50);
this.scale = this:GetScale();
this:RegisterForDrag("LeftButton");
</OnLoad>
<OnDragStart>
if IsAltKeyDown() then
this:StartMoving();
end
</OnDragStart>
<OnDragStop>
this:StopMovingOrSizing();
</OnDragStop>
<OnUpdate>
if this:GetScale() ~= this.scale then this:SetScale(this.scale) end
myTargetModelFrame_TargetModel:SetCamera(0);
</OnUpdate>
</Scripts>
</Button>
---------------------------------------------------------------------
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » SetFacing & SetCamera


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