Has anyone had an issue where the landscape auto rotation is always backwards? I just picked up the Kindle Fire HD last night for testing. I’m not sure if this happens on other Kindles. I have Unity 3.5.6f4
Example: Launch the app and hold it landscape, it is upside down. Flip the device, it rotates again to be upside down.
I also noticed this when I downloaded Battleheart from the store, which was built in Unity (though I believe is no longer supported).
Our programmer says he was not using Unity’s auto rotation because that caused crashes on Android 4.1. We are working on iOS releases right now, and won’t get back to the Android versions for another week or two. If we can figure this out, I will be sure to post here.
We are wondering if Unity might fix this issue with an update?
Amazon changed in the new Kindle os (for the new devices) how rotation works… and you have to Manually manage that. We haven’t had a chance to mess w/it yet but apparently its sending either the opposite rotation information or its sending the portrait versions as landscape.
Yeah, if you set it to a landscape mode the app launches fine in that mode… but whenever autorotation is on it rotates to the opposite view mode. I know that the kindle team is essentially sending the messages backwards (as i understand it this was an intentional change)… so i’d imagine that there has to be special code written to handle the kindle hd ONLY rotation issues and send the opposite messages when rotation happens.
I’m currently corresponding with the people over at Amazon over this exact issue. This is the solution they gave me (which is not unity-code but you get the idea):
Now, since we can’t insert that piece of code after Unity calls setRequestedOrientation for us, I’m currently trying the following:
I then use their information “Amazon” and “WFJWI” to check if it’s the Kindle Fire HD, and use the opposite orientation.
I don’t have a Kindle Fire HD to test this on though, so could somebody check if it works? Here’s the code I use to change orientation:
That code works… i just added it to one of my main update functions so its persistent. I will note that for some reason my Kindle HD (which is the kindle HD not the kindle hd 8.9) returns a Model of KFTT. I’ve set mine to check for both model numbers… but yea, that code works well!
Good to know. I found a quick post somewhere that lists the model numbers as follows:
1st gen Kindle Fire: Kindle Fire
2nd gen Kindle Fire: KFOT
7”HD Kindle Fire: KFTT
WiFi 8.9“HD Kindle Fire:WFJWI
WAN8.9"HD Kindle Fire:WFJWA
So you’d need to add all of the HD’s in those checks to account for the issues… Kind of annoying as this would need to be updated with every new model. I’ll ask Amazon if there’s any way to check for this in the future without having to re-export the game.
Thanks gametr4x… added in the additional platforms. Not sure if update is the best place to put the code but it seems to work flawlessly there. Really appreciate you doing the legwork on it!
We’ve had reports from Amazon about this issue but we’ve yet to bring one in to test it ourselves. It does sound like the fault is with Amazon and it’s an issue that Amazon should deal with rather than us, but thanks for the input from everyone here.
When we get the HD in I’ll try the code reported above and report.
Well, it is technically ‘OK’ for them to configure the device to have reverseDefaultRotation = true, but it makes the terminology LandscapeLeft/Right in Unity a bit awkward.
In Unity 4.0 we’ve made sure AutoRotation works with both of the Landscape modes (same way as Portrait works).
One can just use the Unity SystemInfo.deviceModel. I’ve only managed to test this on the “Amazon KFTT” (Kindle Fire HD 7") model. I am assuming Unity reports the other models in a similar manner.
It’s funny that the “WFJ…” are incorrect, because amazon themselves sent me the incorrect ones then as well…
Guess I missed the SystemInfo.deviceModel variable. Why did they decide to put those two values together btw? That just makes it less handy to work with.
EDIT: Based on all the info I have I’m now checking for the following device models (including the incorrect ones amazon gave me, just in case)
I wonder if they plan on fixing this for 3.5? I got $4500 dollars tied up into 3.5 and it would be a shame if the stopped updating 3.5 and went to 4.0. Took me for ever to get the cash for 3.5 and it will take me a while to get the cash to upgrade to 4.0.