I want to move the mouse horizontally and rotate my model about the model matrix vector that is parallel to the screen view…

I think I need to keep track of the up vector throughout my rotations. I am havin trouble with this though. Does anyone one know if this is the way to do this, or can help??

I can actually get it to work if I do only one rotation say just about the x or just the y by using these vectors:

upvect[0]=0.;

upvect[1]=cos(yrot*3.14159/180.);
upvect[2]=sin(yrot*3.14159/180.);

```
rgtvect[0]=cos(xrot*3.14159/180.);
rgtvect[1]=0.0;
rgtvect[2]=-sin(xrot*3.14159/180.);
```

but if i try to mix x and y rotation things get all mixed up.

[This message has been edited by delic (edited 10-27-2002).]