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

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
darydol
Posts: 1
Joined: Mon Jan 18, 2010 3:46 am

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

Post 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
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post 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.
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
frr171
Posts: 4
Joined: Sat Jan 02, 2010 10:17 pm
Location: Chandler Arizona
Contact:

Post by frr171 »

I think what you need to do is to use ICameraSceneNode::setUpVector() to determine which way is up relative to the camera.
strale
Posts: 119
Joined: Wed Nov 23, 2005 1:58 pm
Location: Lambrugo Italy
Contact:

Post 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
:)
Post Reply