Game Development Reference
In-Depth Information
Fig 8.5 Orientations of a
Google Nexus One HTC
mobile phone.
Listing 8.2 Unity JavaScript to Report on Device Orientation
private var orientString = "Unknown";
private var pivotPoint = Vector2(200,200);
private var rotAngle = 0;
function OnGUI()
{
if (Input.deviceOrientation == DeviceOrientation.FaceDown)
{
orientString = "Face Down";
rotAngle = 0;
}
if (Input.deviceOrientation == DeviceOrientation.FaceUp)
Search Nedrilad ::




Custom Search