Advertisement

11.22.2008 at 06:13PM PST, ID: 23928409 | Points: 500
[x]
Attachment Details

Make Orbit Camera (3d game)

I'm making a 3d game.

I've got a star and I want my camera to orbit the star when the user moves the mouse. This is a pretty standard feature for many 3d games and other 3d programs (think 3d studio max or another modeler that allows the user to rotate the view around an object).

What I know is this:
- Start X,Y when the mouse started to move
- End X,Y where the mouse is at 'now'
- The diff between the two

I've got a camera at some XYZ coordinate looking at the object - what I need help with is calculating where the camera should move based on the XY of the mouse movement.

Anyone?
 
 
 
Expert Comment by ozo:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by Chumad:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by SunnyDark:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by ozo:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by Chumad:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by SunnyDark:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by ozo:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-45 - Hierarchy / EE_QW_2_20070628