Thread Tools Display Modes
08-26-13, 07:00 AM   #1
elcius
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 75
Determining the camera's direction and/or angle

Addons cannot determine the camera's direction and/or angle.
can be done using party nameplates, www.youtube.com/watch?v=2Hl8_48e9KM

Last edited by elcius : 08-26-13 at 08:54 AM.
  Reply With Quote
08-26-13, 07:36 AM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
That was broken during Wrath, and is invalid. AddOns cannot determine the camera's direction and/or angle. Blizzard specifically release patch 3.3 to address this.
  Reply With Quote
08-26-13, 08:44 AM   #3
elcius
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 75
Originally Posted by myrroddin View Post
That was broken during Wrath, and is invalid. AddOns cannot determine the camera's direction and/or angle. Blizzard specifically release patch 3.3 to address this.
that video was taken in 5.3
you can fairly easily calculate the camera pitch when provided with a party members nameplate by solving the SSA triangle of the distance between the party member and the zoom of the camera, and the angle between the nameplate and the player/center line, this gets you camera distance from the target, from there you calculate the 2 possible intersection points and use the most logical one.
when provided with more than 1 nameplate you don't even need to hook the zoom or use player direction and can just reverse the transformation matrices to calculate the camera location, but that's a little more complicated.
  Reply With Quote
08-26-13, 09:41 AM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
That's a pretty nice workaround.

Although I presume if it ends up into a popular addon they'll just remove more camera info from being accessible to addons.
  Reply With Quote
08-26-13, 11:35 AM   #5
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
That calculation sounds like an awesome workaround indeed. If anybody turns that into a usable API, I can create an add-on that makes virtual pets that follow you around and only you can see
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
08-26-13, 11:44 AM   #6
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I explained how to do this exact thing in the #WoWUIDev channel 5 months ago and everyone pretty much universally decided it would be a bad idea to implement on the off-chance blizzard breaks nameplates.

On the other hand, I've been infinitely curious what blizzard's reaction would be and now that the cat's out of the bag it's only a matter of time before someone resurrects something like AVR Encounters.
  Reply With Quote
08-26-13, 12:10 PM   #7
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
I would like to believe that other developers, who may consider writing the new AVR, would avoid it because they already know for a fact Blizzard disapproves of it, and probably realize that in the not-that-long run they will gain nothing and, most likely, lose whatever bit of the API Blizzard breaks as a result.
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
08-26-13, 01:04 PM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Damn, i want this in my addon.
The question is is it working when you jump/move/change z axis. Because the guy in the video didn't really wanted to move.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Determining the camera's direction and/or angle


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