Archived

This topic is now archived and is closed to further replies.

arrogantgod

How to move camera - ala Quake Mouse Move

Recommended Posts

Guest Anonymous Poster   
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
CJ    122
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......

Share this post


Link to post
Share on other sites
arrogantgod    122
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

Share this post


Link to post
Share on other sites