瀏覽代碼

Use Lean Angle for Body Steering

Till Steinert 2 年之前
父節點
當前提交
2a965c1e04
共有 1 個文件被更改,包括 3 次插入1 次删除
  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: