• World of Warcraft Addons
  • World of Warcraft
  • Average Rating:

  • Your Rating

  • Share
  • Report Abuse

LibCamera-1.0

 

Project Updated:
Files Updated: Sat, Sep 5 2009
Supports Game Version: 3.2.0
Category: Libraries
Tags:

[Edit Tags]

Project Manager: Saiket
Additional Authors: No additional authors
Current Version: LibCamera-1.0 r780
License: GNU General Public License version 3 (GPLv3)
Development Site: CurseForge
Avg Daily DL (last 30 days): 1
Downloads Total: 515
Favorites: 1
Comments: 1
  • Curse Giveaways
  • Alganon

    Alganon

    Alganon Open Beta Key Giveaway Alganon is an upcoming fantasy-based MMORPG that allows thousands of people to play together in a virtual world that features a rich history dominated by commanding deities...

    Get Key

  • Contests
  • About LibCamera-1.0
  •  

LibCamera-1.0 is an embedded library to keep track of where the player's camera is, relative to the world.  Its most useful purpose is to position UI elements relative to the in-game world to simulate a 3D overlay.

Details

Implementation

Camera position information is retrieved through CVars saved using the SaveView() function.  Those angles, relative to the player, are then transformed to world-relative coordinates using the world map's player direction arrow.  Yaw offsets from FlipCameraYaw() are also taken into account.

User API

.GetCameraPosition()

Returns the pitch, yaw, and distance of the camera from the player.

Pitch, Yaw, Distance = LibStub( "LibCamera-1.0" ).GetCameraPosition();
Pitch
The pitch of the camera, in radians. 0 represents parallel to the horizon, and looking downwards from there increases the pitch value.  Note that pitch is only bounded by the pitchLimit console command, and can go above and below -2π.
Yaw
The yaw of the camera, in radians.  0 represents due north, and the value increases as the camera looks counter-clockwise.  Range of [0,2π).
Distance
The distance from the camera to the player, in meters.  Range of [0,∞).

.GetCameraDistance()

Returns only the distance of the camera from the player.

Distance = LibStub( "LibCamera-1.0" ).GetCameraDistance();
Distance
The distance from the camera to the player, in meters.  Range of [0,∞).

Note: Camera data will not be available unless at least one callback is registered to recieve either "LibCamera_Update" or "LibCamera_UpdateDistance" messages below.

CallbackHandler-1.0 Messages

"LibCamera_Update"
Fired only when the player's camera moves relative to the world, and at most once per frame.  The arguments provided are identical to the return values of .GetCameraPosition() above.
"LibCamera_UpdateDistance"
Fired only when the player's camera zoom changes, and at most once per frame.  The arguments provided are identical to the return values of .GetCameraDistance() above.

  • Downloads (3)
  •  
File Name Release Type Game Version Downloads Date
Addon Curse.com Beta 2.3.3 0 9/29/2008
  File Name Release Type Game Version Downloads Date  
  LibCamera-1.0 r780 Release 3.2.0 234 9/5/2009
  LibCamera-1.0 r725 Release 3.2.0 155 8/4/2009
  LibCamera-1.0 r549 Release 3.1.0 126 6/8/2009
  • 1 page(s)
  • Screenshots (1)
  •  
  • Comments

Add Comment  

Add

You need to login or register to post.

Benefits of Registration

  • Interact with hundreds of thousands of other gamers on an open social network.
  • Post your stories, news, images, videos, and other content to share.
  • Create a network with your fellow gamers or join an existing one.
  • Gain reputation for everything you do.
  • Bizurkur said

    Wow this has serious potential, are there any addons that use this information yet?

    Reply Report Permalink
  • Saiket said

    None that I know of yet, heheh. I wrote a mod like GatherHud that does a pretty good job of simulating a 3D HUD over the game world, but I won't be releasing it until it has a few more features.

    Reply Report Permalink
  • 1 page(s)
  • Similar Addons
  •  

Average downloads per day

  1. 1,468 Addon Control Panel Libraries, Development Tools...
  2. 970 Ace3 Libraries
  3. 617 LibRock-1.0 Libraries
  4. 473 LibHealComm-4.0 Libraries
  5. 438 Ace2 Libraries