Przeglądaj źródła

Use Lean Angle for Body Steering

Till Steinert 2 lat temu
rodzic
commit
2a965c1e04

+ 3 - 1
Assets/Scripts/Controller/SensorBikeController.cs

@@ -80,7 +80,9 @@ namespace Controller
                     var polarData = sensorData.BleData;
                     if (polarData != null)
                     {
-                        bicycleController.CurrentSteerAngle = (polarData.Value.Acc.y - polarRotationMapping.center) * leanFactor;
+                        bicycleController.CurrentLeaningAngle = (polarData.Value.Acc.y - polarRotationMapping.center) * leanFactor;
+                        // Activate below in case we also need the steering angle
+                        //bicycleController.CurrentSteerAngle = (polarData.Value.Acc.y - polarRotationMapping.center) * leanFactor;
                     }
                     break;
                 case SteeringMode.HMD: