PDA

View Full Version : Dynamic Camera mod


Xython
18-01-2008, 04:47 PM
Okay, hopefully I can explain this better here than in the ShoutBox, cuz in the ShoutBox, no one knew what I meant.
I want a mod that will move the camera in and out, back and forth, up and down, maybe configurable, according to what I am doing.
So if I am out of combat the screen will zoom out a little bit, but once I get into combat it will zoom in to a range that I can see what I'm doing. When I'm outside and mounted, then the camera will zoom out as far as it can go. Maybe random other actions can make the camera move as well.
Please please please tell me if there's even a way that this can be possible, and if so, can someone help me with it?

Moongaze
20-01-2008, 10:46 PM
I know that you can define 5 different camera views (one be all the way zoomed out, another can be 1st person, another top-down, etc) with the "SaveView(n)" API, n being 1 - 5. Then, if you call the API "SetView(n)" with n being 1 - 5, the camera will reset itself to the saved position. This is also built into WOW in the Keybind settings as well, where you can cycle though all 5 views as well as bind specific views to keys.

An addon can watch for an event (such as, combat start, combat end, if you are mounted or not mounted) and when that event happens, it can set the camera choice to one of your pre-defined 5 views.

I don't know of an addon that exists to do this for you, but it would be fairly easy to make and I'm sure someone could whip it up for you. Granted, you will only have 5 views to use, and you probably will need to set each view manually, but it should work nonetheless.

Moongaze
20-01-2008, 10:52 PM
Also, you can setup some dynamic camera movements as well with the interface API, but I'm not sure how much control you'll be able to have on it. One example could be that if you're in combat and you are casting a spell, the camera could rotate to the front of your character and zoom in a little bit (to show you casting ... ?) and then when the spell finishes, it would return to the normal "in combat" view point. The rotation of the camera and zooming in of the camera might not be very accurate though, since I don't remember if you can tell the UI to be at a specific angle and zoom factor. I think it's more like telling the game to "start rotating" the camera, but you have to also tell it to "stop" ... and I don't remember if we can have access to the exact angle or zoom factor the game is using by using code ... it might be hidden or protected. I'll have to refresh my memory by reading wowwiki again for the API stuff, but that site is a little slow for me right now, so I'll wait for later =)

Xython
22-01-2008, 12:07 AM
well... I have no idea what a lot of stuff you just said means... I've never written an addon and I have no clue how... but thanks for at least telling me that something like this CAN exist. you are the first person, so far, that actualy understood what I meant.

spadron
22-01-2008, 12:56 AM
Good idea...wish I knew how to mod

Moongaze
22-01-2008, 05:55 AM
Well, the good news is pretty much what you said: It can be done. I provided my gooey thoughts on the matter in case an addon author with some free time could provide you with what you want :) Of course, they could go about it their own way, or they can use my explaination to at least create a framework that they can start with.

I could probably knock out a very basic idea of what you're asking for when I get back home in another day or two, but I'm fairly busy with other projects I'm working on ... so it won't be very, um ... fleshed out and feature rich. Very basic, trust me, haha.

Xython
23-01-2008, 06:29 AM
Well, all I want is something simple. at least to begin with. I would really appreciate it if you could try to make something for me.

ChaosInc
26-01-2008, 04:35 AM
I hate you Moon.....

Fine, I'll whip something up for you. It'll be basic (still got bugs in other mods to work out) as that the overall function doesn't require any fanciness. Keep a look over the next couple of days as I'll code it up as life permits me to.

thorleader
26-01-2008, 04:38 AM
chaos for president anyone?

ChaosInc
26-01-2008, 08:28 AM
Done. Uploaded, just waiting approval. Look for "Dynamic Camera".

As I said, it's simple for now. I have a lot of other projects that I've been neglecting that I should really finish. As suggestions come, I'll get to em as quick as I can.

Edit: And yes, it is possible to rotate the camera on the Z-axis by "x" degrees and all those other crazy camera gimmicks that I'm sure people will want. Later down the line I'll implement these.

Xython
26-01-2008, 06:12 PM
SWEET!!! thanks!!!

Rushster
26-01-2008, 08:44 PM
Approved Chaos.

Done. Uploaded, just waiting approval. Look for "Dynamic Camera".

As I said, it's simple for now. I have a lot of other projects that I've been neglecting that I should really finish. As suggestions come, I'll get to em as quick as I can.

Edit: And yes, it is possible to rotate the camera on the Z-axis by "x" degrees and all those other crazy camera gimmicks that I'm sure people will want. Later down the line I'll implement these.

Everglow
23-04-2008, 01:57 AM
I simply added
this:RegisterEvent("COMBAT_LOG_EVENT");
to the OnLoad function. Now it checks to see if I'm mounted whenever anything gets added to my combat log, which is pretty often.