• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3172
  • Last Modified:

Rotate camera with mouse motion

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
palehose
Asked:
palehose
  • 5
  • 2
1 Solution
 
ikeworkCommented:
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
 
InteractiveMindCommented:
0
 
palehoseAuthor Commented:
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
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
palehoseAuthor Commented:
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
 
palehoseAuthor Commented:
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
 
palehoseAuthor Commented:
Figured it out, thanks for the help.
0
 
ikeworkCommented:
hi palehose,

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

ike
0
 
palehoseAuthor Commented:
I did.  Everything works perfectly, thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now