Browse Source

Use Lean Angle for Body Steering

Till Steinert 2 years ago
parent
commit
2a965c1e04
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Assets/Scripts/Controller/SensorBikeController.cs

+ 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: