Thread Tools Display Modes
04-29-07, 02:55 AM   #1
Silh
A Fallenroot Satyr
 
Silh's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 20
Camera control

Earlier today I was browsing through the camera functions, wondering if there was any way to program in smooth camera moves for filming. I've used the camera presets in the past, and they can work fairly well, but the speed of the transition is on the fast side and cannot be varied, and sometimes you may not necessarily want a fast camera move.

I'd played with using OnUpdate triggered FlipCameraYaw() calls (with very small increments) for pans... and I suppose one could play with CameraZoomIn/Out, though I haven't tried those out yet.

Along the way though, I found out you can retrieve the current camera pitch, yaw, and distance by calling SaveView() to save the camera position to one of the 5 view slots, and then using GetCVar() to retrieve the appropriate variables. However, there are a few quirks with this... cameraYaw is apparently relative to the player when you're not mouselooking, but relative to the gameworld instead when mouselooking. cameraPitch doesn't always seem to be correct either (especially if the camera runs into an object and has to be moved closer), though in the majority of cases it's usually right.

I went and added camera positioning to my Ping Direction addon so that the arrow would point in the correct direction regardless of whether your camera was directly behind your player or not. Then I started thinking... could you SetCVar() and then use SetView() to move the camera to an arbitrary position? This doesn't seem to work though. Even though GetCVar() will return the values that you set earlier, SetView() will not use them. I'm not sure if I've missed something though; can't say I'm terribly familiar with any quirks in the cvar system.

So, just wondering if anybody else has ever tried playing with camera control and/or have any other ideas?
  Reply With Quote
04-29-07, 10:19 AM   #2
ReverendD
A Rage Talon Dragon Guard
 
ReverendD's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 343
For smooth panning, have you tried dropping the speed at which your mouse moves? Slowing it down or reducing it's sensitivity will decrease it's movement rate thus removing much of the jerky motions and should give you a smooth pan. Only prob after that is needing a large mouse area to move your mouse around unless you are using some sort of trac ball.

Just a thought.
__________________
"Computers have enabled people to make more mistakes faster than almost any invention in history, with the possible exception of tequila and hand guns" - Mitch Ratcliffe
“A computer once beat me at chess, but it was no match for me at kick boxing” - Emo Phillips
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Camera control

Thread Tools
Display Modes

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