Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Rotate camera with mouse motion

Posted on 2009-04-02
8
Medium Priority
?
3,166 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

609 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