Log in or register to post comments

Vuforia landscape issues

August 21, 2014 - 1:43pm #1

First off, thanks for providing the Books sample app; it's helping me a lot!

However, I'm having problems with rotating to landscape. In my own app, I've copied over the code from Books for dealing with the transition to landscape. However, the eaglView does not seem to be updated properly, namely I get black areas on the left and top of the screen (and in landscape right, I get black bars on the right). If I include the following debugging code in the section of handleARViewRotation that deals with the transition to Landscape Left:

CGRect afterBounds = [eaglView bounds];
NSLog(@"viewBounds.size.width: %f; viewBounds.size.height: %f", viewBounds.size.width, viewBounds.size.height);
NSLog(@"arViewRect.size.width: %f; arViewRect.size.height: %f", arViewRect.size.width, arViewRect.size.height);
NSLog(@"afterBounds.origin.x: %f; afterBounds.origin.y: %f", afterBounds.origin.x, afterBounds.origin.y);
NSLog(@"afterBounds.size.width: %f; afterBounds.size.height: %f", afterBounds.size.width, afterBounds.size.height);

I get the following output:

2014-08-21 16:20:16.946 Art for Spooks[3149:60b] ARVC: Rotating to Landscape Left
2014-08-21 16:20:16.948 Art for Spooks[3149:60b] viewBounds.size.width: 568.000000; viewBounds.size.height: 320.000000
2014-08-21 16:20:16.949 Art for Spooks[3149:60b] arViewRect.size.width: 320.000000; arViewRect.size.height: 568.000000
2014-08-21 16:20:16.950 Art for Spooks[3149:60b] afterBounds.origin.x: 0.000000; afterBounds.origin.y: 0.000000
2014-08-21 16:20:16.952 Art for Spooks[3149:60b] afterBounds.size.width: 320.000000; afterBounds.size.height: 568.000000

Notice that afterBounds width and height is incorrect.

If I include the same debugging code in the Books project, I get the correct width and height after rotation.

Any suggestions of where I'm going wrong? Thanks!

Vuforia landscape issues

November 7, 2014 - 12:16pm #3

Could you give a code snipped or more information on how to implement this solution.

Thank you in advance

Vuforia landscape issues

September 16, 2014 - 11:14am #2



I did a workaround by making a cgaffinetransform on the glView after rotating the device to landscapeLeft / landscapeRight.




Log in or register to post comments