Camera Rotate Y

View previous topic View next topic Go down

Camera Rotate Y

Post  flying24 on Sun Feb 15, 2009 6:36 pm

Is it possible to rotate a camera on it's y axis? Like if you wanted to have a roll effect? I find it hard to believe that there wouldn't be, but between dir, loc, rotatex and rotatez I don't see any way to do it. Thank you!

flying24

Posts : 9
Join date : 2009-02-13

View user profile

Back to top Go down

Re: Camera Rotate Y

Post  sio2interactive on Sun Feb 15, 2009 6:57 pm

Just use the _SIO2camera->_SIO2transform->rot->y and Bind the matrix again...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Camera Rotate Y

Post  flying24 on Mon Feb 16, 2009 1:27 am

SIO2 helped me out... here is a method that works:

glPushMatrix();
glRotatef( DESIREDANGLE, 0.0f, 1.0f, 0.0f );

then render the camera, and finally

glPopMatrix();

flying24

Posts : 9
Join date : 2009-02-13

View user profile

Back to top Go down

Re: Camera Rotate Y

Post  enzofrancesca on Wed Feb 18, 2009 12:31 am

uhm... the method above updates the view, but not the direction the camera is moving.
How can we achieve an effect like rotatex method does?

enzofrancesca

Posts : 3
Join date : 2009-02-18
Age : 42
Location : Modena, Italy

View user profile http://www.bitmetrics.it

Back to top Go down

Re: Camera Rotate Y

Post  sio2interactive on Wed Feb 18, 2009 1:04 am

the direction will stay the same you are rotating around a fixed axis...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Camera Rotate Y

Post  enzofrancesca on Wed Feb 18, 2009 1:41 am

You are right. Sorry, my mistake Very Happy in the last two days I was trying to implement my personal camera class, the same that I use in other projects on other platforms and so I'm a little confused Smile
What is not so clear is why the y axis is not treated like other axis i.e. the exporter from blender seems to not export it and there isn't a special function to rotate the camera on that axis.
But as stated above in other posts it's possible to achieve easily all the rotations.
Sorry again and happy coding!

enzofrancesca

Posts : 3
Join date : 2009-02-18
Age : 42
Location : Modena, Italy

View user profile http://www.bitmetrics.it

Back to top Go down

Re: Camera Rotate Y

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum