From: Sean S. <vu...@cs...> - 2003-02-05 04:11:57
|
Sounds like you're drawing the cube off-center and then rotating the off-center cube. What you really want is to draw the cube centered with the "camera," then rotate it, and then translate it out so that you can see it (otherwise you'd be inside it :). Of course when you use OpenGL you have to specify transformations BEFORE you draw, so keep this in mind while you code your transformations (glRotate/glTranslate should be sufficient). If you get what you're getting right now, you can *probably* (depends on how you're doing it for the "probably" to work) just switch around your glRotate and glTranslate and make it work. Sean > Okay, I'm just trying to get a little more practice programming 3D with > OpenGL and SDL. In Ben's tutorial last semester there was a spinning cube > that you could look at using the mouse and arrow keys. I'm trying to change > this a bit, and I have a problem. Whenever I move my mouse, it seems to be > rotating the cube around me, and that's really not what I want. I just want > to "look" somewhere else. I want the cube to stay rotating in it's own > original space. Can anyone help? Thanks! > > Jacob > > > > _________________________________________________________________ > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. > http://join.msn.com/?page=features/virus > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > ISUGameDev-devel mailing list > ISU...@li... > https://lists.sourceforge.net/lists/listinfo/isugamedev-devel > -- |