Skip to main content
GameDev.net gamedev.net
🔒 Locked

Camera movement math reference

Started by Berryblue031 Nov 25, 2008 at 12:40 PM 2 replies 1.1k views
Original Post
Berryblue031
Berryblue031
Hi, I am looking for a good math reference for smart moving in-game camera systems, something to the effect of "you can use this type of math function to achieve this type of movement affect and watchout for these pitfalls" I have a strong background in math, but it's a little rusty and there are some techniques that I know in principle that unfortunately I would never think to apply to a camera. Any suggestions?
Zakwayda
Zakwayda
Quote:
Original post by Berryblue031
Hi,

I am looking for a good math reference for smart moving in-game camera systems, something to the effect of "you can use this type of math function to achieve this type of movement affect and watchout for these pitfalls"

I have a strong background in math, but it's a little rusty and there are some techniques that I know in principle that unfortunately I would never think to apply to a camera.

Any suggestions?
What kind of motion do you have in mind? Is this for a third-person camera? First-person?
jdindia
jdindia
I'm sure someone has written about this somewhere, I just don't know where. =
What I'd do is load up a few games with 3rd person cameras and just watch what they do. I think you can tell what kind of camera logic is going on.

For example, I remember in WoW, the camera hangs out behind you in some default spot. When you move it, it slowly slides back to the default position (here any sliding function would probably be fine, you'd just have to tweak it). It also does a ray test from the character to the camera to make sure nothing is in the way, and if something is the camera gets pushed right up against whatever was blocking the way - and then slides back to the default position when it's unblocked.

That's pretty simple logic. I imagine for some games it's more complicated, but I really do think you can see most of what's going on.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.