Thread Tools Display Modes
05-21-11, 09:14 AM   #1
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
Rotating a Portrait

Hi there,

i need some help, i want to rotate some of my portraits, so they look to the left side instead of the right side,

i searched google/wowi, found that with :SetCamera(1) i can rotate them with :SetFacing(value), but with :SetCamera(0) (portrait mode, set by ouf), i haven't found a way to do that

do you know any solution for this?
  Reply With Quote
05-21-11, 11:25 AM   #2
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
You can create a PostUpdate function for your portraits.

Code:
local Portrait_PostUpdate = function(Portrait, unit)
		Portrait:SetCamera(0, 1 or 2)
		Portrait:SetFacing(whatever)
		...
end
Code:
self.Portrait.PostUpdate = Portrait_PostUpdate
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
05-21-11, 12:40 PM   #3
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
i know,

but the problem is:

when i set :SetCamera to 0, :SetFacing does nothing,

SetCamera(1) is the normal full size portrait, but i want (0) which is the head only portrait to be flipped

edit: with SetCamera(1), i can use SetPosition(x,y,z), currently playing around to "simulate" SetCamera(0) then i can rotate

Last edited by Thalyra : 05-21-11 at 12:47 PM.
  Reply With Quote
05-21-11, 07:51 PM   #4
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 154
If you SetCamera to 1 (full-body), you can then call PlayerModel:SetPortraitZoom( 1.0 ) to zoom in on the face just like camera 0. SetRotation still works in this view too.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Rotating a Portrait


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