iPad orientation

Our iPad release was rejected due to orientation issues. Thanks to the fine folks on this forum we were able to fix it and things are now flipping nicely!

The problem is the tilt steering. We run in LandscapeRight and LandscapeLeft and use the accelerometer to steer the character. At times during a run the steering gets confused and inverts itself. Sometimes it returns to normal, sometimes it doesn’t.

If you flip the device during gameplay the steering flips like it should, sometimes it does not.

Anybody run across this issue?

Is there any particular situation where this occurs consistently? Can you post the code you are using to generate the rotation from the accelerometer input? A common cause of sudden flipping of orientation is Quaternion.LookRotation (and some other functions). These depend on two vectors; if they ever get too closely aligned, the rotation can immediately reverse unexpectedly.

That sounds exactly like what is happening. I’ll parse through code right now and post up what I’ve found.
Thanks so much for your help!

Please bear with me, I a bit out of my element on this one.

[code{
if (iPhoneInput.orientation == iPhoneOrientation.LandscapeLeft)
{
cha.leftRight = -((iPhoneInput.acceleration.y * (tiltControlSnow)));
cha.forwardBack = ((iPhoneInput.acceleration.x * (tiltControlSnow )));
}
else
{
cha.leftRight = ((iPhoneInput.acceleration.y * (tiltControlSnow)));
cha.forwardBack = -((iPhoneInput.acceleration.x * (tiltControlSnow )));
}[/code]

My esteemed colleague fixed it!
Thanks -