![]() |
| | #1 |
| Registered User Join Date: Nov 2001
Posts: 162
| looking and moving up and down(pitch) using glRotate() Code: glRotatef(pitch,1.0f,0,0); |
| Crossbow is offline | |
| | #2 |
| Has a Masters in B.S. Join Date: Aug 2001
Posts: 2,267
| if i get what your saying correctly, it's because at 90 degrees you should be rotating on the z axis to go up and down... the way you are attempting to do this is fairly complicated, you could try Code: void gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, GLdouble upx, GLdouble upy, GLdouble upz ); eyex, eyey, eyez The position of the eye point. centerx, centery, centerz The position of the reference point. upx, upy, upz The direction of the up vector.
__________________ ADVISORY: This users posts are rated CP-MA, for Mature Audiences only. |
| no-one is offline | |
| | #3 |
| Registered User Join Date: Nov 2001
Posts: 162
| Ok, I looked up that function and it will work, but there is one thing I don't know about it, and that is the up vector. When I change the values it doesn't seem to have any effect. What does it do? |
| Crossbow is offline | |
| | #4 |
| Has a Masters in B.S. Join Date: Aug 2001
Posts: 2,267
| it specifies the up "Vector" technically its the up Axis so if you use (0.0,1.0,0.0) then positive y is up if you use (0.0,-1.0,0.0) negative y is up if you us (1.0,0.0,0.0) positive x is up get it? using decimal points wont really change anything...
__________________ ADVISORY: This users posts are rated CP-MA, for Mature Audiences only. |
| no-one is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|