소스 검색

Use Lean Angle for Body Steering

Till Steinert 3 년 전
부모
커밋
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: