How to move camera - ala Quake Mouse Move

Started by
5 comments, last by arrogantgod 24 years, 7 months ago
If I understand correctly, what you need to do is:
- when translating the 'camera' vector, translate the 'target' vector by the same amount
- when you want to "rotate" the camera, translate the 'target' vector by the opposite of the 'camera' vector, rotate it (mouse speed*mouse movement left-right around Y axis and mouse speed*mouse movement up-down around X) and then translate by the 'camera' vector again.
I must say, though, I wouldn't use a camera-target vector system for viewing in a 3D engine because it simply isn't enough - you can't rotate the view around the camera-target vector. I recommend either adding the missing angle or rather having 3 angles (around X axis, around Y axis and around Z axis) replacing the 'target' vector.
Advertisement
Hmmmmmm......you want to move the mouse over the screen, as soon as the mouse comes near the border of your screen, then you want it to move....right?

I would say that you first just see if you can move the mouse, and target with it.....just show it in 2d on the screen so....it's always the same depth.....and when it comes to the border, then just rotate.....

or is that not what you mean?

------------------
Dance with me......

I have some code that I will be posting soon of a terrain project I did for class that uses the "Quake-type mouse" for looking around. It uses OpenGL for rendering.

Kevin

Admin for GameDev.net.

Please send me the code!

Thanks,
webmaster@arrogantgod.com

Please post the code soon, as I'm curious to see if I have done it the same way...

Benjamin Tolputt
aka "Night's Eternity"
Ok, I want to emulate the movement found in Quake, Everquest, and most all other 1st person 3d games.

I am not a math genius, so please give me an example.

I have a camera eye x,y,z and a target x,y,z. When I press forward I want the eye to move towards the target at (n) speed and the target to move away from the eye at (n) speed. This way I never catch up to the target but I always move towards it.

When I select to look left or right I want the target to go left in view space and when I select to look right I want the target to pan to the right in view space.

Basically I want to reproduce the mouse look option in quake.

Please help.

I am using Direct3D Immediate Mode, 6.1 with Microsoft Visual C++ 6.0.

Thanks Much,
ArrogantGod
webmaster@arrogantgod.com

I'll try to have it up within 2 days. First, I need to find the disk that has it, and second, I need to go through and mark the places of interest. :-)

Kevin

Admin for GameDev.net.

This topic is closed to new replies.

Advertisement