FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Camera Rotate Y

3 posters

Go down

Camera Rotate Y Empty Camera Rotate Y

Post  flying24 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

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  sio2interactive Sun Feb 15, 2009 6:57 pm

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

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

http://sio2interactive.com

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  flying24 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

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  enzofrancesca 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 : 49
Location : Modena, Italy

http://www.bitmetrics.it

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  sio2interactive Wed Feb 18, 2009 1:04 am

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

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

http://sio2interactive.com

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  enzofrancesca 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 : 49
Location : Modena, Italy

http://www.bitmetrics.it

Back to top Go down

Camera Rotate Y Empty Re: Camera Rotate Y

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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