// Use this for initialization void Start() { // for distance calculation --> its much easier to make adjusments in the editor, just put // your camera where you want it to be if (target == null) { Debug.LogWarning("Warning! Target for TurntableSensorCamera is null."); return; } // if distance is set to zero, use current camera position --> easier setup if (distance == 0) { distance = (transform.position - target.position).magnitude; } // if you start the app, you will be viewing in the same direction your unity camera looks right now if (useRelativeCameraRotation) { initialCameraRotation = Quaternion.Euler(0, transform.rotation.eulerAngles.y, 0); } else { initialCameraRotation = Quaternion.identity; } // direct call // Sensor.Activate(Sensor.Type.RotationVector); // SensorHelper call with fallback SensorHelper.ActivateRotation(); // SensorHelper.TryForceRotationFallback(RotationFallbackType.OrientationAndAcceleration); StartCoroutine(Calibration()); }
void Start() { SensorHelper.ActivateRotation(); initialSensorValue = SensorHelper.rotation; gotFirstValue = false; StartCoroutine(Calibration()); }
void Start() { // Used to enable standalone client to run beside server on same machine Screen.fullScreen = false; SensorHelper.ActivateRotation(); //StartCoroutine(Calibration()); }
void Start() { SensorHelper.ActivateRotation(); PrimeraPersona = UIUtils.Find("/Vista1erPersona").camera; TerceraPersona = UIUtils.Find("/Vista3erPersona").camera; CambiarCamaraTerceraPersona(); }
// Use this for initialization void Start() { // you can use the API directly: // Sensor.Activate(Sensor.Type.RotationVector); // or you can use the SensorHelper, which has built-in fallback to less accurate but more common sensors: SensorHelper.ActivateRotation(); useGUILayout = false; }
// Use this for initialization void Start() { // or you can use the SensorHelper, which has built-in fallback to less accurate but more common sensors: SensorHelper.ActivateRotation(); }