|
@@ -77,8 +77,14 @@ namespace Controller
|
|
|
case SteeringMode.HMD:
|
|
|
// TODO: Convert steering relative to bike
|
|
|
Debug.Log("HMD Rotation " + player.transform.eulerAngles);
|
|
|
- var rot = player.transform.rotation;
|
|
|
- var yaw = Mathf.Asin(2 * rot.x * rot.y + 2 * rot.z * rot.w);
|
|
|
+
|
|
|
+ //Stand 02Juni Lab:
|
|
|
+ //var rot = player.transform.rotation;
|
|
|
+ //var yaw = Mathf.Asin(2 * rot.x * rot.y + 2 * rot.z * rot.w);
|
|
|
+
|
|
|
+ //Lisa:
|
|
|
+ //var rot = player.transform.localRotation.eulerAngles.y; // https://answers.unity.com/questions/149801/transformrotation-in-degrees-instead-of-0-to-1.html
|
|
|
+ //var yaw = rot *3f; // da kopfdrehung relativ gering im vergleich zu einer lenkraddrehung, faktor ggf. erhöhen
|
|
|
bicycleController.CurrentSteerAngle = yaw;
|
|
|
break;
|
|
|
}
|