소스 검색

Test Vive Tracker on back

Marcel Zickler 3 년 전
부모
커밋
f08bea48e4

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

@@ -638,6 +638,7 @@
             <e p="Readme.cs" t="Include" />
           </e>
         </e>
+        <e p="ViveDebugData.cs" t="Include" />
         <e p="Wheels" t="Include">
           <e p="Scripts" t="Include">
             <e p="FreeCamera.cs" t="Include" />

+ 18 - 15
.idea/.idea.VRCyling/.idea/workspace.xml

@@ -20,19 +20,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="ae9d46da-fd77-45ea-9287-d8d155f44bcf" name="Default Changelist" comment="Primitive steering with Vive Tracker">
+      <change afterPath="$PROJECT_DIR$/Assets/ViveDebugData.cs" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.VRCyling/.idea/contentModel.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/Editor/FrontWheelTrackerEditor.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Editor/FrontWheelTrackerEditor.cs" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Assets/FrontWheelTracker.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FrontWheelTracker.cs" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Plotting/plots.meta" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/Assets/Scripts/BicyleController/SensorBikeController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/BicyleController/SensorBikeController.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$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/obj/Debug/Assembly-CSharp.csprojAssemblyReference.cache" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/obj/Debug/SteamVR_Windows_EditorHelper.csprojAssemblyReference.cache" beforeDir="false" afterPath="$PROJECT_DIR$/obj/Debug/SteamVR_Windows_EditorHelper.csprojAssemblyReference.cache" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -49,6 +42,7 @@
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/526469D5-A48C-43EE-BD9A-F19F8745AFA1/68/360ad80c/PlayerPrefs.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/A8E33794-C006-4F2A-A201-ADE069162226/7e/d8f633a7/EditorGUILayout.cs" root0="SKIP_HIGHLIGHTING" />
     <setting file="file://$PROJECT_DIR$/Assets/Scripts/ResetPlayerPosition/BikeReset.cs" root0="FORCE_HIGHLIGHTING" />
+    <setting file="file://$PROJECT_DIR$/Assets/ViveDebugData.cs" root0="FORCE_HIGHLIGHTING" />
   </component>
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
@@ -65,8 +59,9 @@
         <option value="$PROJECT_DIR$/Assets/Scripts/ResetPlayerPosition/MovePlayerPosition.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/ResetPlayerPosition/PersistatePlayerPosition.cs" />
         <option value="$PROJECT_DIR$/Assets/Editor/FrontWheelTrackerEditor.cs" />
-        <option value="$PROJECT_DIR$/Assets/FrontWheelTracker.cs" />
         <option value="$PROJECT_DIR$/Assets/Scripts/BicyleController/SensorBikeController.cs" />
+        <option value="$PROJECT_DIR$/Assets/FrontWheelTracker.cs" />
+        <option value="$PROJECT_DIR$/Assets/ViveDebugData.cs" />
       </list>
     </option>
   </component>
@@ -119,7 +114,7 @@
       <updated>1606388694739</updated>
       <workItem from="1606388712651" duration="10566000" />
       <workItem from="1607346787506" duration="4055000" />
-      <workItem from="1607418056368" duration="2337000" />
+      <workItem from="1607418056368" duration="3760000" />
     </task>
     <task id="LOCAL-00001" summary="VR Stuff, Bicycle Animations">
       <created>1606399745852</created>
@@ -142,7 +137,14 @@
       <option name="project" value="LOCAL" />
       <updated>1607352302170</updated>
     </task>
-    <option name="localTasksCounter" value="4" />
+    <task id="LOCAL-00004" summary="Vive Tracker Adjustments">
+      <created>1607420956941</created>
+      <option name="number" value="00004" />
+      <option name="presentableId" value="LOCAL-00004" />
+      <option name="project" value="LOCAL" />
+      <updated>1607420956941</updated>
+    </task>
+    <option name="localTasksCounter" value="5" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
@@ -168,7 +170,8 @@
     <MESSAGE value="VR Stuff, Bicycle Animations" />
     <MESSAGE value="persistate player position and vr bike data display" />
     <MESSAGE value="Primitive steering with Vive Tracker" />
-    <option name="LAST_COMMIT_MESSAGE" value="Primitive steering with Vive Tracker" />
+    <MESSAGE value="Vive Tracker Adjustments" />
+    <option name="LAST_COMMIT_MESSAGE" value="Vive Tracker Adjustments" />
   </component>
   <component name="WindowStateProjectService">
     <state width="1877" height="375" key="GridCell.Tab.0.bottom" timestamp="1607420237809">
@@ -243,10 +246,10 @@
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
     <state x="461" y="164" key="SettingsEditor/0.0.1920.1040@0.0.1920.1040" timestamp="1607347297764" />
-    <state x="552" y="252" key="Vcs.Push.Dialog.v2" timestamp="1607352304153">
+    <state x="552" y="252" key="Vcs.Push.Dialog.v2" timestamp="1607420959871">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>
-    <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1607352304153" />
+    <state x="552" y="252" key="Vcs.Push.Dialog.v2/0.0.1920.1040@0.0.1920.1040" timestamp="1607420959871" />
     <state x="623" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1606398194772">
       <screen x="0" y="0" width="1920" height="1040" />
     </state>

+ 1 - 0
Assembly-CSharp.csproj

@@ -285,6 +285,7 @@
      <Compile Include="Assets\Scripts\WCTest\Stabilizer.cs" />
      <Compile Include="Assets\Scripts\WheelDrive.cs" />
      <Compile Include="Assets\TutorialInfo\Scripts\Readme.cs" />
+     <Compile Include="Assets\ViveDebugData.cs" />
      <Compile Include="Assets\Wheels\Scripts\FreeCamera.cs" />
      <None Include="Assets\TextMesh Pro\Shaders\TMPro.cginc" />
      <None Include="Assets\TextMesh Pro\Shaders\TMP_SDF-Mobile Overlay.shader" />

+ 4 - 0
Assets/FrontWheelTracker.cs

@@ -27,6 +27,10 @@ public class FrontWheelTracker : MonoBehaviour
             if (x > 180) x = -(360 - x);
             if (y > 180) y = -(360 - y);
             if (z > 180) z = -(360 - z);
+            
+            if (x < -180) x = -(-360 - x);
+            if (y < -180) y = -(-360 - y);
+            if (z < -180) z = -(-360 - z);
             return new Vector3(x,y,z);
         }
     }

+ 8 - 0
Assets/Plotting/plots.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2bc3f6558e37d974cbc65faa493b956a
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 26 - 0
Assets/ViveDebugData.cs

@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using TMPro;
+using UnityEngine;
+
+public class ViveDebugData : MonoBehaviour
+{
+
+    public FrontWheelTracker tracker;
+
+    public TextMeshProUGUI posText;
+
+    public TextMeshProUGUI rotText;
+    // Start is called before the first frame update
+    void Start()
+    {
+        
+    }
+
+    // Update is called once per frame
+    void Update()
+    {
+        posText.text = $"Pos: {tracker.Position.ToString()}";
+        rotText.text = $"Rot: {tracker.Rotation.ToString()}";
+    }
+}

+ 11 - 0
Assets/ViveDebugData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e322a5e62a5468f4389056f040fa551a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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