Ver Fonte

FanController + Bugfixes

Marcel Zickler há 3 anos atrás
pai
commit
ef995287ff

+ 1 - 0
.idea/.idea.VRCyling/.idea/indexLayout.xml

@@ -43,6 +43,7 @@
       <Path>Integrations</Path>
       <Path>Library</Path>
       <Path>Logs</Path>
+      <Path>Temp</Path>
       <Path>UserSettings</Path>
       <Path>obj</Path>
     </explicitExcludes>

+ 94 - 58
.idea/.idea.VRCyling/.idea/workspace.xml

@@ -22,17 +22,15 @@
     <select />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="ae9d46da-fd77-45ea-9287-d8d155f44bcf" name="Default Changelist" comment="WIP: slope adjustment">
-      <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.xml" afterDir="false" />
+    <list default="true" id="ae9d46da-fd77-45ea-9287-d8d155f44bcf" name="Default Changelist" comment="ipd stuff">
+      <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/indexLayout.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/indexLayout.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp-Editor.csproj" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Assembly-CSharp.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/Assembly-CSharp.csproj" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Materials/Vignette.mat" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Materials/Vignette.mat" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Assets/Scenes/MainScene.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/MainScene.unity" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/VirtualNose.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/VirtualNose.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Editor.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Input_Editor.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Input_Editor.csproj" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/SteamVR_Windows_EditorHelper.csproj" beforeDir="false" afterPath="$PROJECT_DIR$/SteamVR_Windows_EditorHelper.csproj" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/DynamicReductionSource.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/DynamicReductionSource.cs" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/FanController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/FanController.cs" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/VibrationController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/VibrationController.cs" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -47,6 +45,9 @@
     <setting file="file://$PROJECT_DIR$/Assets/SteamVR/Plugins/openvr_api.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/Wheels/SwitchColliderOnStanding.cs" root0="FORCE_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/Tracking/KineticLegTracker.cs" root0="FORCE_HIGHLIGHTING" />
+    <setting file="mock:///Dummy.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="mock:///Dummy.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="mock:///Dummy.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1A3A5801-6E2C-4FF1-B975-52B718793608/5a/7e36ae17/DepthOfField.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.valvesoftware.unity.openvr@e340bc848225-1611139568890/Runtime/openvr_api.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.render-pipelines.universal@8.2.0/Runtime/ScriptableRendererData.cs" root0="SKIP_HIGHLIGHTING" />
@@ -56,6 +57,7 @@
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/62FFEEB7-EC02-4BEA-B61E-5FBF8D44AC5B/e2/54e16cc4/Math.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/Animation/BikeAnimation.cs" root0="FORCE_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.inputsystem@1.0.1/InputSystem/Utilities/PrimitiveValue.cs" root0="SKIP_HIGHLIGHTING" />
+    <setting file="mock:///Dummy.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1A3A5801-6E2C-4FF1-B975-52B718793608/65/0ec761f4/DepthOfFieldModeParameter.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/F352B6B8-9F0F-458F-8952-E62C7DE1DBFE/f4/b5ba078b/VolumeParameter`1.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/VirtualNose.cs" root0="FORCE_HIGHLIGHTING" />
@@ -63,8 +65,6 @@
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Data/BikeGameObjectDataLogger.cs" />
-        <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Data/BikeSensorDataLogger.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Data/PolarAccDataLogger.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Data/PolarEcgDataLogger.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Logging/Data/SensorDataLogger.cs" />
@@ -105,7 +105,6 @@
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/MatchPlayerPositionAndCalibrate.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Controller/Bicycle/IBicycleController.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/CameraTracker.cs" />
-        <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/VibrationController.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/IdentifyTrackers.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/IViveTracker.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Tracking/FrontWheelTracker.cs" />
@@ -114,6 +113,9 @@
         <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/IpdInfo.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/Controller/Bicycle/RbBicycleController.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/VirtualNose.cs" />
+        <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/FanController.cs" />
+        <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/DynamicReductionSource.cs" />
+        <option value="$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Haptic/VibrationController.cs" />
       </list>
     </option>
   </component>
@@ -138,10 +140,10 @@
     <property name="vue.rearranger.settings.migration" value="true" />
   </component>
   <component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor &amp; Play">
-    <configuration name="Attach to Unity Editor &amp; Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="59256">
+    <configuration name="Attach to Unity Editor &amp; Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="20716">
       <option name="allowRunningInParallel" value="false" />
       <option name="listenPortForConnections" value="false" />
-      <option name="pid" value="59256" />
+      <option name="pid" value="20716" />
       <option name="selectedOptions">
         <set />
       </option>
@@ -191,7 +193,8 @@
       <workItem from="1616403254170" duration="2841000" />
       <workItem from="1616484098735" duration="5506000" />
       <workItem from="1616600379396" duration="1501000" />
-      <workItem from="1617013015246" duration="1500000" />
+      <workItem from="1617013015246" duration="1521000" />
+      <workItem from="1617088014991" duration="3749000" />
     </task>
     <task id="LOCAL-00001" summary="VR Stuff, Bicycle Animations">
       <created>1606399745852</created>
@@ -333,7 +336,14 @@
       <option name="project" value="LOCAL" />
       <updated>1616604309315</updated>
     </task>
-    <option name="localTasksCounter" value="21" />
+    <task id="LOCAL-00021" summary="ipd stuff">
+      <created>1617014532531</created>
+      <option name="number" value="00021" />
+      <option name="presentableId" value="LOCAL-00021" />
+      <option name="project" value="LOCAL" />
+      <updated>1617014532531</updated>
+    </task>
+    <option name="localTasksCounter" value="22" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -375,7 +385,8 @@
     <MESSAGE value="Automatic tracker indeces" />
     <MESSAGE value="WIP: consider IPD for virtual noses" />
     <MESSAGE value="WIP: slope adjustment" />
-    <option name="LAST_COMMIT_MESSAGE" value="WIP: slope adjustment" />
+    <MESSAGE value="ipd stuff" />
+    <option name="LAST_COMMIT_MESSAGE" value="ipd stuff" />
   </component>
   <component name="WindowStateProjectService">
     <state x="704" y="291" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1612943194023">
@@ -387,115 +398,123 @@
     </state>
     <state x="476" y="134" key="#xdebugger.evaluate/0.0.1440.860@0.0.1440.860" timestamp="1608570995081" />
     <state x="188" y="243" key="#xdebugger.evaluate/0.0.1440.900@0.0.1440.900" timestamp="1608637186447" />
-    <state width="680" height="497" key="DebuggerActiveHint" timestamp="1611319259442">
+    <state width="680" height="497" key="DebuggerActiveHint" timestamp="1617090082962">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="478" height="402" key="DebuggerActiveHint/0.0.1440.900@0.0.1440.900" timestamp="1608636244835" />
-    <state width="680" height="497" key="DebuggerActiveHint/0.0.2048.1112@0.0.2048.1112" timestamp="1611319259442" />
-    <state width="1002" height="414" key="GridCell.Tab.0.bottom" timestamp="1617013441841">
+    <state width="680" height="497" key="DebuggerActiveHint/0.0.2048.1112@0.0.2048.1112" timestamp="1617090082962" />
+    <state width="1002" height="414" key="GridCell.Tab.0.bottom" timestamp="1617090193634">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.0.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449594" />
-    <state width="1002" height="414" key="GridCell.Tab.0.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617013441841" />
-    <state width="1002" height="414" key="GridCell.Tab.0.center" timestamp="1617013441841">
+    <state width="1002" height="414" key="GridCell.Tab.0.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193634" />
+    <state width="1002" height="414" key="GridCell.Tab.0.center" timestamp="1617090193634">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659056" />
     <state width="1398" height="320" key="GridCell.Tab.0.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.center/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449593" />
-    <state width="1002" height="414" key="GridCell.Tab.0.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617013441841" />
-    <state width="1002" height="414" key="GridCell.Tab.0.left" timestamp="1617013441841">
+    <state width="1002" height="414" key="GridCell.Tab.0.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193634" />
+    <state width="1002" height="414" key="GridCell.Tab.0.left" timestamp="1617090193634">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659056" />
     <state width="1398" height="320" key="GridCell.Tab.0.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304835" />
     <state width="1877" height="385" key="GridCell.Tab.0.left/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449593" />
-    <state width="1002" height="414" key="GridCell.Tab.0.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617013441841" />
-    <state width="1002" height="414" key="GridCell.Tab.0.right" timestamp="1617013441841">
+    <state width="1002" height="414" key="GridCell.Tab.0.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193634" />
+    <state width="1002" height="414" key="GridCell.Tab.0.right" timestamp="1617090193634">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.0.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.0.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.0.right/0.0.1920.1040@0.0.1920.1040" timestamp="1610538449594" />
-    <state width="1002" height="414" key="GridCell.Tab.0.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617013441841" />
-    <state width="1002" height="414" key="GridCell.Tab.1.bottom" timestamp="1617013451137">
+    <state width="1002" height="414" key="GridCell.Tab.0.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193634" />
+    <state width="1002" height="414" key="GridCell.Tab.1.bottom" timestamp="1617090193458">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.1.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
-    <state width="1002" height="414" key="GridCell.Tab.1.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617013451137" />
-    <state width="1002" height="414" key="GridCell.Tab.1.center" timestamp="1617013451136">
+    <state width="1002" height="414" key="GridCell.Tab.1.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.1.center" timestamp="1617090193458">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.1.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.center/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
-    <state width="1002" height="414" key="GridCell.Tab.1.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617013451136" />
-    <state width="1002" height="414" key="GridCell.Tab.1.left" timestamp="1617013451136">
+    <state width="1002" height="414" key="GridCell.Tab.1.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.1.left" timestamp="1617090193458">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659057" />
     <state width="1398" height="320" key="GridCell.Tab.1.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304836" />
     <state width="1877" height="385" key="GridCell.Tab.1.left/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457609" />
-    <state width="1002" height="414" key="GridCell.Tab.1.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617013451136" />
-    <state width="1002" height="414" key="GridCell.Tab.1.right" timestamp="1617013451136">
+    <state width="1002" height="414" key="GridCell.Tab.1.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.1.right" timestamp="1617090193458">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.1.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.1.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.1.right/0.0.1920.1040@0.0.1920.1040" timestamp="1610538457610" />
-    <state width="1002" height="414" key="GridCell.Tab.1.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617013451136" />
-    <state width="1877" height="385" key="GridCell.Tab.2.bottom" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.1.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.2.bottom" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.2.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659059" />
     <state width="1398" height="320" key="GridCell.Tab.2.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304839" />
     <state width="1877" height="385" key="GridCell.Tab.2.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.2.center" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.2.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.2.center" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.2.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.2.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304838" />
     <state width="1877" height="385" key="GridCell.Tab.2.center/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.2.left" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.2.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.2.left" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.2.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659058" />
     <state width="1398" height="320" key="GridCell.Tab.2.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304837" />
     <state width="1877" height="385" key="GridCell.Tab.2.left/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.2.right" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.2.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.2.right" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.2.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659059" />
     <state width="1398" height="320" key="GridCell.Tab.2.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304838" />
     <state width="1877" height="385" key="GridCell.Tab.2.right/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.3.bottom" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.2.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.3.bottom" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.3.bottom/0.0.1440.860@0.0.1440.860" timestamp="1608571659060" />
     <state width="1398" height="320" key="GridCell.Tab.3.bottom/0.0.1440.900@0.0.1440.900" timestamp="1608637304840" />
     <state width="1877" height="385" key="GridCell.Tab.3.bottom/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.3.center" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.3.bottom/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.3.center" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.3.center/0.0.1440.860@0.0.1440.860" timestamp="1608571659059" />
     <state width="1398" height="320" key="GridCell.Tab.3.center/0.0.1440.900@0.0.1440.900" timestamp="1608637304839" />
     <state width="1877" height="385" key="GridCell.Tab.3.center/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.3.left" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.3.center/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.3.left" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.3.left/0.0.1440.860@0.0.1440.860" timestamp="1608571659059" />
     <state width="1398" height="320" key="GridCell.Tab.3.left/0.0.1440.900@0.0.1440.900" timestamp="1608637304839" />
     <state width="1877" height="385" key="GridCell.Tab.3.left/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
-    <state width="1877" height="385" key="GridCell.Tab.3.right" timestamp="1609933996568">
-      <screen x="0" y="0" width="1920" height="1040" />
+    <state width="1002" height="414" key="GridCell.Tab.3.left/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
+    <state width="1002" height="414" key="GridCell.Tab.3.right" timestamp="1617090193458">
+      <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state width="1398" height="278" key="GridCell.Tab.3.right/0.0.1440.860@0.0.1440.860" timestamp="1608571659059" />
     <state width="1398" height="320" key="GridCell.Tab.3.right/0.0.1440.900@0.0.1440.900" timestamp="1608637304839" />
     <state width="1877" height="385" key="GridCell.Tab.3.right/0.0.1920.1040@0.0.1920.1040" timestamp="1609933996568" />
+    <state width="1002" height="414" key="GridCell.Tab.3.right/0.0.2048.1112@0.0.2048.1112" timestamp="1617090193458" />
     <state x="662" y="317" key="MultipleFileMergeDialog" timestamp="1612528086834">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
@@ -515,13 +534,13 @@
     <state x="69" y="76" width="1302" height="708" key="VCS.FileHistoryDialog/0.0.1440.860@0.0.1440.860" timestamp="1610365025117" />
     <state x="69" y="80" width="1302" height="741" key="VCS.FileHistoryDialog/0.0.1440.900@0.0.1440.900" timestamp="1608635342446" />
     <state x="98" y="98" width="1852" height="916" key="VCS.FileHistoryDialog/0.0.2048.1112@0.0.2048.1112" timestamp="1615979704751" />
-    <state x="589" y="269" key="Vcs.Push.Dialog.v2" timestamp="1616604399306">
+    <state x="589" y="269" key="Vcs.Push.Dialog.v2" timestamp="1617014534110">
       <screen x="0" y="0" width="2048" height="1112" />
     </state>
     <state x="414" y="208" key="Vcs.Push.Dialog.v2/0.0.1440.860@0.0.1440.860" timestamp="1610362459013" />
     <state x="414" y="218" key="Vcs.Push.Dialog.v2/0.0.1440.900@0.0.1440.900" timestamp="1608628624093" />
     <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1610531923390" />
-    <state x="589" y="269" key="Vcs.Push.Dialog.v2/0.0.2048.1112@0.0.2048.1112" timestamp="1616604399306" />
+    <state x="589" y="269" key="Vcs.Push.Dialog.v2/0.0.2048.1112@0.0.2048.1112" timestamp="1617014534110" />
     <state width="726" height="436" key="XDebugger.FullValuePopup" timestamp="1608570184149">
       <screen x="0" y="0" width="1440" height="860" />
     </state>
@@ -610,17 +629,30 @@
           <option name="timeStamp" value="23" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="DotNet Breakpoints">
-          <url>file://$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/VirtualNose.cs</url>
-          <line>45</line>
-          <properties documentPath="C:\Users\student\Desktop\VRCyling\Assets\Scripts\SicknessReduction\Visual\VirtualNose.cs" initialLine="42">
+          <url>file://$PROJECT_DIR$/Assets/Scripts/SicknessReduction/DynamicReductionSource.cs</url>
+          <line>63</line>
+          <properties documentPath="C:\Users\student\Desktop\VRCyling\Assets\Scripts\SicknessReduction\DynamicReductionSource.cs" initialLine="63">
+            <startOffsets>
+              <option value="2181" />
+            </startOffsets>
+            <endOffsets>
+              <option value="2268" />
+            </endOffsets>
+          </properties>
+          <option name="timeStamp" value="26" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="DotNet Breakpoints">
+          <url>file://$PROJECT_DIR$/Assets/Scripts/SicknessReduction/Visual/Vignetting/RestrictionSuggestor.cs</url>
+          <line>70</line>
+          <properties documentPath="C:\Users\student\Desktop\VRCyling\Assets\Scripts\SicknessReduction\Visual\Vignetting\RestrictionSuggestor.cs" initialLine="70">
             <startOffsets>
-              <option value="1349" />
+              <option value="2212" />
             </startOffsets>
             <endOffsets>
-              <option value="1423" />
+              <option value="2243" />
             </endOffsets>
           </properties>
-          <option name="timeStamp" value="24" />
+          <option name="timeStamp" value="27" />
         </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
@@ -637,6 +669,10 @@
         <watch expression="typeof(BikeSensorDataLog).GetFields(BindingFlags.Instance  | BindingFlags.NonPublic)" language="C#" />
         <watch expression="value.GetType().GetFields(BindingFlags.Default | BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.DeclaredOnly)" language="C#" />
         <watch expression="HeaderNames" language="C#" />
+        <watch expression="angularVelocitySuggestor" language="C#" />
+        <watch expression="bikeController" language="C#" />
+        <watch expression="bikeController.rigidBody" language="C#" />
+        <watch expression="bikeController.rigidBody.transform" language="C#" />
       </configuration>
     </watches-manager>
   </component>

+ 1 - 1
Assembly-CSharp.csproj

@@ -244,6 +244,7 @@
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Profile\Types\BpStatus.cs" />
      <Compile Include="Assets\Scripts\Logging\Data\PolarAccDataLogger.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Profile\Mesgs\FieldCapabilitiesMesg.cs" />
+     <Compile Include="Assets\Scripts\SicknessReduction\DynamicReductionSource.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\AntPlusDeviceType.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Profile\Types\CameraEventType.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Profile\Mesgs\WorkoutMesg.cs" />
@@ -335,7 +336,6 @@
      <Compile Include="Assets\Scripts\SicknessReduction\Visual\Rendering\BokehFeature.cs" />
      <Compile Include="Assets\AdvancedAnt\Scripts\SpeedDisplay.cs" />
      <Compile Include="Assets\AdvancedAnt\Plugins\Ant\Fit\Mesg.cs" />
-     <Compile Include="Assets\Scripts\SicknessReduction\DynamicReductionSource.cs" />
      <None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" />
      <None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" />
      <None Include="Assets\AdvancedAnt\Plugins\Ant\License.txt" />

+ 2 - 2
Assets/Materials/Vignette.mat

@@ -58,10 +58,10 @@ Material:
     - _GlossMapScale: 0
     - _Glossiness: 0
     - _GlossyReflections: 0
-    - _IFOV: 0.94482726
+    - _IFOV: 0.94480544
     - _InnerRadius: 0.15
     - _Metallic: 0
-    - _OFOV: 0.9948273
+    - _OFOV: 0.99480546
     - _OcclusionStrength: 1
     - _QueueOffset: 0
     - _ReceiveShadows: 1

+ 293 - 297
Assets/Scenes/MainScene.unity

@@ -26,7 +26,7 @@ RenderSettings:
   m_AmbientIntensity: 1
   m_AmbientMode: 0
   m_SubtractiveShadowColor: {r: 0.13296545, g: 0.19145328, b: 0.33962262, a: 1}
-  m_SkyboxMaterial: {fileID: 722670853}
+  m_SkyboxMaterial: {fileID: 1387490029}
   m_HaloStrength: 0
   m_FlareStrength: 1
   m_FlareFadeSpeed: 3
@@ -174455,288 +174455,6 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 722245199}
   m_PrefabAsset: {fileID: 0}
---- !u!21 &722670853
-Material:
-  serializedVersion: 6
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_Name: Sky 02
-  m_Shader: {fileID: 4800000, guid: 6fc9318f5193c094c98c0d450cd61e3b, type: 3}
-  m_ShaderKeywords: _BACKGROUNDMODE_COLORS _CLOUDSLITBYSUN_ON _DISABLEDIRECTIONLIGHT_ON
-    _ENABLECLOUDS_ON _ENABLEDIRECTIONLIGHT_ON _ENABLESUNMOONMASK_ON _ENABLESUNMOON_ON
-    _ENABLESUN_ON _USECUBEMAP_ON _USEENVIRONMENTGRADIENT_ON _USETEXTURE_ON
-  m_LightmapFlags: 0
-  m_EnableInstancingVariants: 0
-  m_DoubleSidedGI: 0
-  m_CustomRenderQueue: -1
-  stringTagMap: {}
-  disabledShaderPasses: []
-  m_SavedProperties:
-    serializedVersion: 3
-    m_TexEnvs:
-    - _BackgroundCubemap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _BumpMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _CloudsCubemap:
-        m_Texture: {fileID: 8900000, guid: ee7bf433ad404fe4cb5e19b8a93b3bed, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Cubemap:
-        m_Texture: {fileID: 8900000, guid: ae71550a4c81f73409f14f4d6eca2c0f, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _CubemapBG:
-        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailAlbedoMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailMask:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailNormalMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _EmissionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MainTex:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MetallicGlossMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MoonTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Normal:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _OcclusionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _ParallaxMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _PatternCubemap:
-        m_Texture: {fileID: 8900000, guid: 3845b30ba2fbdee44a85e5ead4dd2974, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _PatternOverlay:
-        m_Texture: {fileID: 8900000, guid: 1f3407b97870a2e46864ac55deec53b0, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _SkyPatternOverlay:
-        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Spherical:
-        m_Texture: {fileID: 2800000, guid: 61c0b9c0523734e0e91bc6043c72a490, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _StarsCubemap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Sun:
-        m_Texture: {fileID: 2800000, guid: 19982f8bf5fa2ed42b65ac271d4f0279, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _SunTexture:
-        m_Texture: {fileID: 2800000, guid: dd566660fc358aa4098080e42ca0db56, type: 3}
-        m_Scale: {x: 0, y: 0}
-        m_Offset: {x: 1, y: 1}
-    - _Tex:
-        m_Texture: {fileID: 2800000, guid: 623f215c9cf5dc04aa628d4dd7b6bd73, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _Texture:
-        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TextureSample0:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 4.46, y: 5.19}
-        m_Offset: {x: 0, y: 0}
-    - _TextureSample1:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 1.46, y: -1.61}
-        m_Offset: {x: 1.05, y: 3.12}
-    - _TextureSample2:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TopTexture0:
-        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _TwinklingTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _scaledTexture:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _tex:
-        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _texcoord:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _texture:
-        m_Texture: {fileID: 2800000, guid: 64e7766099ad46747a07014e44d0aea1, type: 3}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    m_Floats:
-    - _BackgroundCat: 1
-    - _BackgroundCubemapSpace: 0
-    - _BackgroundExposure: 1
-    - _BackgroundMode: 0
-    - _Banner: 1
-    - _BumpScale: 1
-    - _CloudHeight: 0
-    - _CloudsCat: 1
-    - _CloudsHeight: 0.1
-    - _CloudsLitbySun: 1
-    - _CloudsRotation: 10
-    - _CloudsRotationSpeed: 1
-    - _Contrast: 0.477
-    - _Contrsat: 1
-    - _Cutoff: 0
-    - _DetailNormalMapScale: 1
-    - _DisableCloudsRotation: 0
-    - _DisableDirectionLight: 1
-    - _DisableRotation: 0
-    - _DstBlend: 0
-    - _Enable1Twinkling: 0
-    - _EnableBuiltinFog: 0
-    - _EnableClouds: 1
-    - _EnableCloudsRotation: 0
-    - _EnableDirectionLight: 1
-    - _EnableFogMessage: 0
-    - _EnableMoon: 0
-    - _EnablePatternOverlay: 0
-    - _EnableSkyPatternOverlay: 0
-    - _EnableStars: 0
-    - _EnableStarsRotation: 0
-    - _EnableStarsTwinkling: 0
-    - _EnableSun: 1
-    - _EnableSunMask: 0
-    - _EnableSunMoon: 1
-    - _EnableSunMoonMask: 1
-    - _EnableTwinkling: 0
-    - _EqHeight: 0.419
-    - _EquatorHeight: 0.275
-    - _EquatorSmoothness: 0.741
-    - _Exposure: 0
-    - _Fade: 0.463
-    - _Float0: 2.7
-    - _Float1: 0
-    - _Float2: 0
-    - _Float3: 8.91
-    - _Float4: -1
-    - _Float5: -0.2
-    - _Float6: 1
-    - _FogCat: 1
-    - _FogFill: 0.273
-    - _FogHeight: 0.165
-    - _FogIntensity: 0
-    - _FogSmoothness: 0.47
-    - _GlossMapScale: 1
-    - _Glossiness: 0.5
-    - _GlossyReflections: 1
-    - _Keyword0: 0
-    - _Metallic: 0
-    - _Mode: 0
-    - _MoonCat: 1
-    - _MoonIntensity: 1
-    - _MoonSize: 0.5
-    - _OcclusionStrength: 1
-    - _Parallax: 0.02
-    - _PatternCat: 1
-    - _PatternContrast: 0.2
-    - _RoatationSpeed: 0.4
-    - _Rotation: 0
-    - _RotationSpeed: 0.5
-    - _SkyPatternContrast: 0.477
-    - _SkyPatternOverlay: 0
-    - _SmoothnessTextureChannel: 0
-    - _SpecularHighlights: 1
-    - _SrcBlend: 1
-    - _StarsAmount: 3
-    - _StarsCat: 1
-    - _StarsHeightMask: 0
-    - _StarsIntensity: 0
-    - _StarsLayer: 1
-    - _StarsRotation: 360
-    - _StarsRotationSpeed: 0.5
-    - _StarsSize: 0
-    - _StarsSunMask: 0
-    - _SunCat: 1
-    - _SunIntensity: 2.33
-    - _SunRadiusB: 0
-    - _SunRadoisA: 0.463
-    - _SunSize: 0.864
-    - _ToggleSwitch0: 0
-    - _TwinklingContrast: 0
-    - _TwinklingSpeed: 0
-    - _UVSec: 0
-    - _UseCUBEMAP: 1
-    - _UseEnvironmentGradient: 1
-    - _UseSkyPatternOverlay: 0
-    - _UseTexture: 1
-    - _WaveScale: 0
-    - _WaveSpeed: 0
-    - _ZWrite: 1
-    - __dirty: 0
-    - _adf: 0
-    - _angle: 145
-    - _fresnell: 0
-    - _mip: 0
-    m_Colors:
-    - _CloudLightColor: {r: 1, g: 1, b: 1, a: 1}
-    - _CloudShadowColor: {r: 0.33239606, g: 0.46899295, b: 0.85294116, a: 1}
-    - _CloudsLightColor: {r: 0.9338235, g: 0.9338235, b: 0.9338235, a: 1}
-    - _CloudsShadowColor: {r: 0.4625865, g: 0.49787903, b: 0.9117647, a: 1}
-    - _Color: {r: 1, g: 1, b: 1, a: 1}
-    - _Color0: {r: 0, g: 0.5054344, b: 1, a: 0}
-    - _Color1: {r: 1, g: 1, b: 1, a: 0}
-    - _Color2: {r: 0.059472326, g: 0.25068596, b: 0.8088235, a: 0}
-    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
-    - _Eq: {r: 1, g: 0.6769777, b: 0.330882, a: 0}
-    - _EquatorColor: {r: 1, g: 0.956522, b: 0.8632076, a: 0}
-    - _Ground: {r: 0.4779411, g: 0.43111518, b: 0.23545504, a: 0}
-    - _GroundColor: {r: 0.3679245, g: 0.3679245, b: 0.3679245, a: 0}
-    - _MoonColor: {r: 1, g: 1, b: 1, a: 1}
-    - _Sky: {r: 0.6691177, g: 0.29519898, b: 0.29519898, a: 0}
-    - _SkyColor: {r: 0.4462442, g: 0.5670902, b: 0.8679245, a: 0}
-    - _Skycol: {r: 0.27941146, g: 0.64219046, b: 1, a: 0}
-    - _SunColor: {r: 1, g: 0.85071, b: 0.66176474, a: 1}
-    - _Tint: {r: 1, g: 1, b: 1, a: 0}
-    - _Vector1: {r: 0, g: 1, b: 0, a: 0}
-    - _water: {r: 0.5, g: 0.5, b: 0.5, a: 1}
-  m_BuildTextureStacks: []
 --- !u!1001 &722803611
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -215484,11 +215202,11 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   prefabToSpawn: {fileID: 6693960596598194774, guid: 9112b64194221f04194f1abe6bbf77c5,
     type: 3}
-  adjustToIpd: 1
+  adjustToIpd: 0
   paddingAt58: {x: 0, y: 0, z: 0}
-  scaleAt58: {x: 0, y: 0, z: 0}
+  scaleAt58: {x: 1, y: 1, z: 1}
   paddingAt70: {x: 0, y: 0, z: 0}
-  scaleAt70: {x: 0, y: 0, z: 0}
+  scaleAt70: {x: 1, y: 1, z: 1}
 --- !u!4 &907111746 stripped
 Transform:
   m_CorrespondingSourceObject: {fileID: 412702, guid: 7b30b5ba44201104fba4e71a527b6905,
@@ -295927,10 +295645,6 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   bicycleController: {fileID: 201820990}
-  channelTopLeft: 0
-  channelBottomLeft: 1
-  channelTopRight: 2
-  channelBottomRight: 3
 --- !u!114 &1250245982
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -295943,7 +295657,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 7f732feaed874302bbb3250ba86b94f1, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  bikeController: {fileID: 0}
+  bikeController: {fileID: 201820990}
   reductionSource: 0
   minValue: 0.3
   maxValue: 0.7
@@ -329952,6 +329666,288 @@ PrefabInstance:
       objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: 60d3688bc6832bf45ac9ea2bf1c8ab03, type: 3}
+--- !u!21 &1387490029
+Material:
+  serializedVersion: 6
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Sky 02
+  m_Shader: {fileID: 4800000, guid: 6fc9318f5193c094c98c0d450cd61e3b, type: 3}
+  m_ShaderKeywords: _BACKGROUNDMODE_COLORS _CLOUDSLITBYSUN_ON _DISABLEDIRECTIONLIGHT_ON
+    _ENABLECLOUDS_ON _ENABLEDIRECTIONLIGHT_ON _ENABLESUNMOONMASK_ON _ENABLESUNMOON_ON
+    _ENABLESUN_ON _USECUBEMAP_ON _USEENVIRONMENTGRADIENT_ON _USETEXTURE_ON
+  m_LightmapFlags: 0
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: -1
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BackgroundCubemap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _CloudsCubemap:
+        m_Texture: {fileID: 8900000, guid: ee7bf433ad404fe4cb5e19b8a93b3bed, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Cubemap:
+        m_Texture: {fileID: 8900000, guid: ae71550a4c81f73409f14f4d6eca2c0f, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _CubemapBG:
+        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MoonTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Normal:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _PatternCubemap:
+        m_Texture: {fileID: 8900000, guid: 3845b30ba2fbdee44a85e5ead4dd2974, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _PatternOverlay:
+        m_Texture: {fileID: 8900000, guid: 1f3407b97870a2e46864ac55deec53b0, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _SkyPatternOverlay:
+        m_Texture: {fileID: 8900000, guid: b8d891a789549494aaa157c0edc53a12, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Spherical:
+        m_Texture: {fileID: 2800000, guid: 61c0b9c0523734e0e91bc6043c72a490, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _StarsCubemap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Sun:
+        m_Texture: {fileID: 2800000, guid: 19982f8bf5fa2ed42b65ac271d4f0279, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _SunTexture:
+        m_Texture: {fileID: 2800000, guid: dd566660fc358aa4098080e42ca0db56, type: 3}
+        m_Scale: {x: 0, y: 0}
+        m_Offset: {x: 1, y: 1}
+    - _Tex:
+        m_Texture: {fileID: 2800000, guid: 623f215c9cf5dc04aa628d4dd7b6bd73, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _Texture:
+        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TextureSample0:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 4.46, y: 5.19}
+        m_Offset: {x: 0, y: 0}
+    - _TextureSample1:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 1.46, y: -1.61}
+        m_Offset: {x: 1.05, y: 3.12}
+    - _TextureSample2:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TopTexture0:
+        m_Texture: {fileID: 2800000, guid: 84508b93f15f2b64386ec07486afc7a3, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _TwinklingTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _scaledTexture:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _tex:
+        m_Texture: {fileID: 2800000, guid: 12726e6bff222df4cbbe3ebde547c297, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _texcoord:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _texture:
+        m_Texture: {fileID: 2800000, guid: 64e7766099ad46747a07014e44d0aea1, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Floats:
+    - _BackgroundCat: 1
+    - _BackgroundCubemapSpace: 0
+    - _BackgroundExposure: 1
+    - _BackgroundMode: 0
+    - _Banner: 1
+    - _BumpScale: 1
+    - _CloudHeight: 0
+    - _CloudsCat: 1
+    - _CloudsHeight: 0.1
+    - _CloudsLitbySun: 1
+    - _CloudsRotation: 10
+    - _CloudsRotationSpeed: 1
+    - _Contrast: 0.477
+    - _Contrsat: 1
+    - _Cutoff: 0
+    - _DetailNormalMapScale: 1
+    - _DisableCloudsRotation: 0
+    - _DisableDirectionLight: 1
+    - _DisableRotation: 0
+    - _DstBlend: 0
+    - _Enable1Twinkling: 0
+    - _EnableBuiltinFog: 0
+    - _EnableClouds: 1
+    - _EnableCloudsRotation: 0
+    - _EnableDirectionLight: 1
+    - _EnableFogMessage: 0
+    - _EnableMoon: 0
+    - _EnablePatternOverlay: 0
+    - _EnableSkyPatternOverlay: 0
+    - _EnableStars: 0
+    - _EnableStarsRotation: 0
+    - _EnableStarsTwinkling: 0
+    - _EnableSun: 1
+    - _EnableSunMask: 0
+    - _EnableSunMoon: 1
+    - _EnableSunMoonMask: 1
+    - _EnableTwinkling: 0
+    - _EqHeight: 0.419
+    - _EquatorHeight: 0.275
+    - _EquatorSmoothness: 0.741
+    - _Exposure: 0
+    - _Fade: 0.463
+    - _Float0: 2.7
+    - _Float1: 0
+    - _Float2: 0
+    - _Float3: 8.91
+    - _Float4: -1
+    - _Float5: -0.2
+    - _Float6: 1
+    - _FogCat: 1
+    - _FogFill: 0.273
+    - _FogHeight: 0.165
+    - _FogIntensity: 0
+    - _FogSmoothness: 0.47
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Keyword0: 0
+    - _Metallic: 0
+    - _Mode: 0
+    - _MoonCat: 1
+    - _MoonIntensity: 1
+    - _MoonSize: 0.5
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _PatternCat: 1
+    - _PatternContrast: 0.2
+    - _RoatationSpeed: 0.4
+    - _Rotation: 0
+    - _RotationSpeed: 0.5
+    - _SkyPatternContrast: 0.477
+    - _SkyPatternOverlay: 0
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 1
+    - _StarsAmount: 3
+    - _StarsCat: 1
+    - _StarsHeightMask: 0
+    - _StarsIntensity: 0
+    - _StarsLayer: 1
+    - _StarsRotation: 360
+    - _StarsRotationSpeed: 0.5
+    - _StarsSize: 0
+    - _StarsSunMask: 0
+    - _SunCat: 1
+    - _SunIntensity: 2.33
+    - _SunRadiusB: 0
+    - _SunRadoisA: 0.463
+    - _SunSize: 0.864
+    - _ToggleSwitch0: 0
+    - _TwinklingContrast: 0
+    - _TwinklingSpeed: 0
+    - _UVSec: 0
+    - _UseCUBEMAP: 1
+    - _UseEnvironmentGradient: 1
+    - _UseSkyPatternOverlay: 0
+    - _UseTexture: 1
+    - _WaveScale: 0
+    - _WaveSpeed: 0
+    - _ZWrite: 1
+    - __dirty: 0
+    - _adf: 0
+    - _angle: 145
+    - _fresnell: 0
+    - _mip: 0
+    m_Colors:
+    - _CloudLightColor: {r: 1, g: 1, b: 1, a: 1}
+    - _CloudShadowColor: {r: 0.33239606, g: 0.46899295, b: 0.85294116, a: 1}
+    - _CloudsLightColor: {r: 0.9338235, g: 0.9338235, b: 0.9338235, a: 1}
+    - _CloudsShadowColor: {r: 0.4625865, g: 0.49787903, b: 0.9117647, a: 1}
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
+    - _Color0: {r: 0, g: 0.5054344, b: 1, a: 0}
+    - _Color1: {r: 1, g: 1, b: 1, a: 0}
+    - _Color2: {r: 0.059472326, g: 0.25068596, b: 0.8088235, a: 0}
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+    - _Eq: {r: 1, g: 0.6769777, b: 0.330882, a: 0}
+    - _EquatorColor: {r: 1, g: 0.956522, b: 0.8632076, a: 0}
+    - _Ground: {r: 0.4779411, g: 0.43111518, b: 0.23545504, a: 0}
+    - _GroundColor: {r: 0.3679245, g: 0.3679245, b: 0.3679245, a: 0}
+    - _MoonColor: {r: 1, g: 1, b: 1, a: 1}
+    - _Sky: {r: 0.6691177, g: 0.29519898, b: 0.29519898, a: 0}
+    - _SkyColor: {r: 0.4462442, g: 0.5670902, b: 0.8679245, a: 0}
+    - _Skycol: {r: 0.27941146, g: 0.64219046, b: 1, a: 0}
+    - _SunColor: {r: 1, g: 0.85071, b: 0.66176474, a: 1}
+    - _Tint: {r: 1, g: 1, b: 1, a: 0}
+    - _Vector1: {r: 0, g: 1, b: 0, a: 0}
+    - _water: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+  m_BuildTextureStacks: []
 --- !u!1001 &1388108456
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -399983,7 +399979,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &1713398612
 Transform:
   m_ObjectHideFlags: 0
@@ -452078,12 +452074,12 @@ PrefabInstance:
     - target: {fileID: 4988978072042319893, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
       propertyPath: lean
-      value: 0
+      value: 1
       objectReference: {fileID: 0}
     - target: {fileID: 4988978072042319893, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
       propertyPath: steer
-      value: 0
+      value: 1
       objectReference: {fileID: 0}
     - target: {fileID: 4988978072042319893, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
@@ -452093,7 +452089,7 @@ PrefabInstance:
     - target: {fileID: 4988978072042319893, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
       propertyPath: accelerate
-      value: 0
+      value: 1
       objectReference: {fileID: 0}
     - target: {fileID: 4988978072042319893, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
@@ -452123,7 +452119,7 @@ PrefabInstance:
     - target: {fileID: 4988978072042319978, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
       propertyPath: m_Enabled
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 4988978072042319979, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
@@ -452143,7 +452139,7 @@ PrefabInstance:
     - target: {fileID: 4988978072042319980, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}
       propertyPath: m_Enabled
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 4988978072042319980, guid: 3b07d6594636ab04d9c1fac04c1cde7e,
         type: 3}

+ 1 - 0
Assets/Scripts/SicknessReduction/DynamicReductionSource.cs

@@ -66,6 +66,7 @@ namespace SicknessReduction
             }
             else
             {
+                if(bikeController == null) Debug.LogError("bike controller = null!");
                 steerAngleSuggestor.Value = bikeController.CurrentSteerAngle;
                 if (reductionSource == ReductionValueSource.SteerAngle)
                 {

+ 14 - 86
Assets/Scripts/SicknessReduction/Haptic/FanController.cs

@@ -5,118 +5,46 @@ using UnityEngine;
 
 namespace SicknessReduction.Haptic
 {
-    
     public class FanController : EspController
     {
         private const int MAX_FAN_CYCLE = 256; //for RES=8
         private const float MAX_CYCLE_AT_SPEED = 6.94f; //25km/h
-        private const int THRES_CYCLE_CHANGE = 6;
+        private const int THRES_CYCLE_CHANGE = 3;
+        private const int NUM_CHANNELS = 4;
         private const string TOPIC = "Fan/CHANNEL_NUMBER/Control";
         private const string CHANNEL_NUMBER_PLACEHOLDER = "CHANNEL_NUMBER";
 
         public RbBicycleController bicycleController;
-        [Header("ESP Channels")] public int channelTopLeft = 0;
-        public int channelBottomLeft = 1;
-        public int channelTopRight = 2;
-        public int channelBottomRight = 3;
+        private int previousFanCycle;
 
-        private Vector2 deviationFromCenter;
-        private Transform cameraTransform;
-        private bool cameraTransformAvailable;
-
-        private Vector4 previousFanCycles;
-
-        private string channelTL;
-        private string channelBL;
-        private string channelTR;
-        private string channelBR;
-
-        protected override void Start()
-        {
-            base.Start();
-            if (Camera.main != null)
-            {
-                cameraTransform = Camera.main.transform;
-                cameraTransformAvailable = true;
-            }
-
-            channelTL = TOPIC.Replace(CHANNEL_NUMBER_PLACEHOLDER, channelTopLeft.ToString());
-            channelBL = TOPIC.Replace(CHANNEL_NUMBER_PLACEHOLDER, channelBottomLeft.ToString());
-            channelTR = TOPIC.Replace(CHANNEL_NUMBER_PLACEHOLDER, channelTopRight.ToString());
-            channelBR = TOPIC.Replace(CHANNEL_NUMBER_PLACEHOLDER, channelBottomRight.ToString());
-        }
 
         protected override async void Update()
         {
             base.Update();
             if (!DoUpdate || PreviousUpdateActive) return;
             PreviousUpdateActive = true;
-            
-            var cycle = FanCycleForSpeed();
-            CalculateDeviation();
-            await SetFanSpeeds(cycle);
-            
-            PreviousUpdateActive = false;
-        }
 
-        private async Task SetFanSpeeds(int maxCycle)
-        {
-            var minCycle = (int) (maxCycle * (1f - Mathf.Abs(deviationFromCenter.x)));
-            var leftCycle = deviationFromCenter.x >= 0 ? minCycle : maxCycle;
-            var rightCycle = deviationFromCenter.x <0 ? minCycle: maxCycle;
-            
-            minCycle = (int) (maxCycle * (1f - Mathf.Abs(deviationFromCenter.y)));
-            var bottomCycle = deviationFromCenter.y >= 0 ? minCycle : maxCycle;
-            var topCycle = deviationFromCenter.y < 0 ? minCycle : maxCycle;
-
-            var cycleTopLeft = Math.Min(topCycle, leftCycle);
-            var cycleBottomLeft = Math.Min(bottomCycle, leftCycle);
-            var cycleTopRight = Math.Min(topCycle, rightCycle);
-            var cycleBottomRight = Math.Min(bottomCycle, rightCycle);
-            
-            await SendFanCycles(cycleTopLeft, cycleBottomLeft, cycleTopRight, cycleBottomRight);
-        }
+            var cycle = FanCycleForSpeed();
+            await SendFanCycles(cycle);
 
-        private async Task SendFanCycles(int tl, int bl, int tr, int br)
-        {
-            var currentCycles = new Vector4(tl, bl, tr, br);
-            if (currentCycles.magnitude <= 0.2f && previousFanCycles.magnitude >0.2f || (currentCycles - previousFanCycles).magnitude > THRES_CYCLE_CHANGE)
-            {
-                Debug.Log($"Sending FanCycles (tl = {tl}, bl = {bl}, tr = {tr}, br = {br}");
-                previousFanCycles = currentCycles;
-                await Broker.Publish(channelTL, tl.ToString());
-                await Broker.Publish(channelBL, bl.ToString());
-                await Broker.Publish(channelTR, tr.ToString());
-                await Broker.Publish(channelBR, br.ToString());
-            }
+            PreviousUpdateActive = false;
         }
 
-        private void CalculateDeviation()
+        private async Task SendFanCycles(int cycle)
         {
-            if (cameraTransformAvailable)
-            {
-                var hmdForward = cameraTransform.forward;
-                var bikeForward = bicycleController.Forward;
-                //Debug.DrawLine(cameraTransform.position, cameraTransform.position + hmdForward * 5, Color.blue);
-                var hmdOnForwardPlane = Vector3.ProjectOnPlane(hmdForward, bicycleController.Up);
-                //Debug.DrawLine(cameraTransform.position, cameraTransform.position + hmdOnForwardPlane * 4, Color.magenta);
-                var hmdOnUpPlane = Vector3.ProjectOnPlane(hmdForward, bicycleController.Right);
-                //Debug.DrawLine(cameraTransform.position, cameraTransform.position + hmdOnUpPlane * 8, Color.green);
-               // Debug.DrawLine(cameraTransform.position, cameraTransform.position + bicycleController.Forward * 10, Color.white);
-                
-                var devLeftRight = Mathf.Clamp(Vector3.Angle(bikeForward, hmdOnForwardPlane), -90f, 90f);
-                var devUpDown = Mathf.Clamp(Vector3.Angle(bikeForward, hmdOnUpPlane), -90f, 90f);
-                deviationFromCenter = new Vector2(devLeftRight, devUpDown)/90f;
-            }
-            else
+            if (Math.Abs(cycle - previousFanCycle) > THRES_CYCLE_CHANGE)
             {
-                deviationFromCenter = Vector2.zero;
+                previousFanCycle = cycle;
+                for (var i = 0; i < NUM_CHANNELS; i++)
+                {
+                    await Broker.Publish(TOPIC.Replace(CHANNEL_NUMBER_PLACEHOLDER, $"{i}"), $"{cycle}");
+                }
             }
         }
 
         private int FanCycleForSpeed()
         {
-            return (int) Mathf.Lerp(0f, MAX_FAN_CYCLE, bicycleController.CurrentSpeed/MAX_CYCLE_AT_SPEED);
+            return (int) Mathf.Lerp(0f, MAX_FAN_CYCLE, bicycleController.CurrentSpeed / MAX_CYCLE_AT_SPEED);
         }
     }
 }

+ 1 - 2
Assets/Scripts/SicknessReduction/Haptic/VibrationController.cs

@@ -41,7 +41,6 @@ namespace SicknessReduction.Haptic
 
             // > 0 while cornering
             var correctedReductionValue = Mathf.Clamp(reductionSource.CurrentValue + reductionSource.Change, 0, 1);
-            Debug.Log($"CorrectedReductionValue = {correctedReductionValue}");
 
             if (!DoUpdate || PreviousUpdateActive) return;
             if (correctedReductionValue > 0)
@@ -61,7 +60,7 @@ namespace SicknessReduction.Haptic
                         throw new ArgumentOutOfRangeException();
                 }
             }
-            else
+            else if(currentCycle != 0)
             {
                 await StopVibrating();
             }

BIN
obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache