Page 1 of 1

How do I rotate the entire screen? ..IPhone is the task

Posted: Mon Jan 18, 2010 4:53 am
by darydol
Hi ..
I can not speak English. Sorry.
When you run the program by raising the height on the iPhone screen's coming Results
I want to rotate horizontally.
Using the data from one irrEdit operations.

smgr-> drawAll ();
It is represented in this function are.
By rotating the end result does have a way to bust?

You do not know how to upload a screen shot did not post the image, sir ..

Image
http://blog.naver.com/darydol/140099152436

Posted: Mon Jan 18, 2010 6:25 pm
by d3jake
If I understand your problem well enough, you should be able to rotate the camera 90 deg around the Z axis opposite to whichever direction the phone was turned.

Posted: Sun Jan 24, 2010 11:07 pm
by frr171
I think what you need to do is to use ICameraSceneNode::setUpVector() to determine which way is up relative to the camera.

Posted: Tue Jan 26, 2010 9:02 am
by strale
To move the camera it could be helpful these formulas to detect camera position x,y,z


PosX = Cam_Radius * sin( Cam_Latitude * Deg2Rad)*cos(Cam_Longitude* Deg2Rad);
PosY = Cam_Radius * sin( Cam_Latitude * Deg2Rad)*sin(Cam_Longitude* Deg2Rad);
PosZ = Cam_Radius * cos(Cam_Latitude * Deg2Rad);

Latitude and longitude could be seen as degree over the "big" sphere where the camera is placed

incrementing the only longitude is easier to figure how the camera is moving

Deg2Rad is 3.14xxxxxxxxxxxx/180.0f

but may be there are easyer way to do this
:)