I am trying to rotate my view based on the CMAttitude returned from the CMMotionManager, specifically pitch = x and roll = y. I use a referential relationship to set my horizon. This works great for portrait mode, but the moment I try to do it for landscape view, it will go wrong. As the phone now rotates 90 cc, I was hoping the koremosia would know that the landscape was in place and keep the pitch and throw useful. Instead, I still have an axis indicating their original path. To try to compensate, I simply changed the sign to roll = x and switched pitch = y. This seemed to work until I held the device in front of me and turned 180 degrees. The view turned upside down and rolled over.
My keen sense tells me that I need to apply the correct transformation in the roll and yaw in order to reorient the attitude.
I hope some geniuses or geniuses can help me. Math is obviously not my forte.
source share