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?
Top Expert: ozo
Expert Since: 08/20/1997
Accepted Solutions: 9624
ozo has been an Expert for 11 years 4 months, during which he has posted 41252 comments and answered 9624 questions. ozo is just one of 191 experts in the Game Programming Zone.
 
 
 
 
20081119-EE-VQP-47 - Hierarchy / EE_QW_2_20070628