?
Solved

Rotate camera with mouse motion

Posted on 2009-04-02
8
Medium Priority
?
3,161 Views
Last Modified: 2013-12-21
Here's what I'm trying to do:  on left mouse click, and motion of the mouse, rotate my camera.  Right right mouse click and movement, zoom in/out.  I'm completely lost.  I'm thinking I need to find the Euler angles for the rotation...?  Somehow get a rotation matrix?  Any help is appreciated.
0
Comment
Question by:palehose
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 20

Accepted Solution

by:
ikework earned 2000 total points
ID: 24057647
hi palehose,

this might help you, its a camera-class doing excactly that:

http://www.experts-exchange.com/Programming/Game/Game_Graphics/DirectX/Q_24274498.html

ike
0
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 24059565
0
 

Author Comment

by:palehose
ID: 24065778
Hi ikework, thanks for the response.  I got the rotation working in my implementation, however it is extremely sensitive.  In other words, it rotates way too much with very little mouse movement.  How can I slow the rotation down a bit?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:palehose
ID: 24065917
Also, one other question: how does your matrix::translate() function work?  I'm trying to figure out how to get the zoom in/out working in my implementation.  I have a translate function which takes a vector, what would the two values in m_pos be?  x and y?
0
 

Author Comment

by:palehose
ID: 24065980
Scratch the second question, I figured it out.  I was just confused at your vector implementation.  I'm still having trouble trying to slow down the rotation a bit, however.
0
 

Author Comment

by:palehose
ID: 24066290
Figured it out, thanks for the help.
0
 
LVL 20

Expert Comment

by:ikework
ID: 24066761
hi palehose,

great to hear that.. did you figure out all your above questions? if not, just tell me .. :)

ike
0
 

Author Comment

by:palehose
ID: 24067627
I did.  Everything works perfectly, thanks again.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question