Thread Tools Display Modes
10-04-08, 05:31 PM   #1
WyriHaximus
An Aku'mai Servant
 
WyriHaximus's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 38
Question Looking direction

Trying to find the function (if it even exist) to find out the direction the player/camera is looking to? Does anyone has a clue if this function exists and what the name is? http://www.wowwiki.com/API doesn't seem to know it .
  Reply With Quote
10-04-08, 05:59 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Those 50 addons that does this already, i belive, reads the minimap
  Reply With Quote
10-04-08, 07:33 PM   #3
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Code:
local facing

if GetCVar("rotateMinimap") == "0" then
     facing = select(49,Minimap:GetChildren()):GetFacing()
else
     facing = MiniMapCompassRing:GetFacing()
end
you can get the camera's position relative to the player's facing with SaveView(index) and then reading the associated cvar which i don't remember :P

Last edited by Akryn : 10-04-08 at 07:37 PM.
  Reply With Quote
10-05-08, 04:51 AM   #4
WyriHaximus
An Aku'mai Servant
 
WyriHaximus's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 38
Thumbs up

Originally Posted by p3lim View Post
Those 50 addons that does this already, i belive, reads the minimap
Figured as much but still didn't know what to look for while scanning through their code. So asked here instead .
Originally Posted by Akryn View Post
Code:
local facing

if GetCVar("rotateMinimap") == "0" then
     facing = select(49,Minimap:GetChildren()):GetFacing()
else
     facing = MiniMapCompassRing:GetFacing()
end
you can get the camera's position relative to the player's facing with SaveView(index) and then reading the associated cvar which i don't remember :P
Ok thanks a lot, will try it out a.s.a.p. !
  Reply With Quote
10-05-08, 07:09 AM   #5
WyriHaximus
An Aku'mai Servant
 
WyriHaximus's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 38
Trying out this atm: http://www.wowwiki.com/GetPlayerBearing
(Sadly enough PTR is kinda slow .)

Last edited by WyriHaximus : 10-05-08 at 07:10 AM. Reason: Forgot the PTR bit
  Reply With Quote
10-05-08, 12:04 PM   #6
WyriHaximus
An Aku'mai Servant
 
WyriHaximus's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 38
Exclamation

Thanks guys it works. Still going over the data but the retrieving of it works .
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Looking direction


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