Rotate the camera instead of the object...

View previous topic View next topic Go down

Rotate the camera instead of the object...

Post  skyman on Fri Apr 17, 2009 4:19 am

Hello to all, looking for a little tips. How do I rotate the camera instead of the object? To rotate the object using this code:

_SIO2object = ( SIO2object * )sio2ResourceGet( sio2->_SIO2resource,SIO2_OBJECT,"object/Cube");
_SIO2object->_SIO2transform->rot->z += 0.01);
sio2TransformBindMatrix( _SIO2object->_SIO2transform );

skyman

Posts : 2
Join date : 2009-04-17

View user profile

Back to top Go down

Re: Rotate the camera instead of the object...

Post  sio2interactive on Fri Apr 17, 2009 4:33 am

sio2Rotate3D

sio2Rotate2D

sio2LookAt

sio2TransformRotateZ

sio2TransformRotateX

_SIO2camera->_SIO2transform->dir->xyz

glRotatef

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Rotate the camera instead of the object...

Post  skyman on Fri Apr 17, 2009 4:48 am

Can you send me example code?

this code:

_SIO2camera->_SIO2transform->dir->z=0.02;
sio2TransformBindMatrix( _SIO2camera->_SIO2transform );

does not seem to work.

Cheers

skyman

Posts : 2
Join date : 2009-04-17

View user profile

Back to top Go down

Re: Rotate the camera instead of the object...

Post  sio2interactive on Fri Apr 17, 2009 5:01 am

Check tutorial04, 06_1, 06_2, 09, 13_2

You have sample code there Wink


Last edited by sio2interactive on Fri Apr 17, 2009 9:55 am; edited 1 time in total (Reason for editing : Typo)

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Rotate the camera instead of the object...

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