From c1d4536d0f0c3b0bdfd9c861f3750dc6702dfb9f Mon Sep 17 00:00:00 2001 From: Ignis Date: Mon, 23 Aug 2021 17:30:04 +0200 Subject: [PATCH] Cleanup & bugfix --- Assets/Scenes/SampleScene.unity | 5 ++-- Assets/Scripts/Dobber.cs | 9 ++---- Packages/manifest.json | 1 + Packages/packages-lock.json | 26 ++++++++++++++++ .../com.unity.probuilder/Settings.json | 30 +++++++++++++++++++ 5 files changed, 62 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index da82b3f..271eae6 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -156,7 +156,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ec5d582fdf544e84d8dff955464dd912, type: 3} m_Name: m_EditorClassIdentifier: - moveSpeed: 1 + moveSpeed: 7.5 + turnSpeed: 5 --- !u!54 &327492103 Rigidbody: m_ObjectHideFlags: 0 @@ -171,7 +172,7 @@ Rigidbody: m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 - m_Constraints: 0 + m_Constraints: 112 m_CollisionDetection: 0 --- !u!23 &327492104 MeshRenderer: diff --git a/Assets/Scripts/Dobber.cs b/Assets/Scripts/Dobber.cs index 1174dfc..9503e52 100644 --- a/Assets/Scripts/Dobber.cs +++ b/Assets/Scripts/Dobber.cs @@ -17,13 +17,8 @@ public class Dobber : MonoBehaviour void Awake() { - //i don't know why dose need to reference it's self but it's requiered to work playerControls = new PlayerControls(); - //automatically find rigidbody in character rb = gameObject.GetComponent(); - //lock rotation of the rigidbody - rb.constraints = RigidbodyConstraints.FreezeRotationZ | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationX; - //here we enable controlls for Dobber character playerControls.DobberControls.Enable(); } @@ -52,8 +47,8 @@ public class Dobber : MonoBehaviour void Move() { //new Vector3 for calculating movement values - Vector3 move = new Vector3(0, 0, moveVertical * 100 * moveSpeed * Time.deltaTime); - Quaternion rotate = Quaternion.Euler(transform.rotation.x, moveHorizontal * 100 * turnSpeed * Time.deltaTime, transform.rotation.z); + Vector3 move = new Vector3(0, 0, moveVertical * moveSpeed); + Quaternion rotate = Quaternion.Euler(transform.rotation.x, moveHorizontal * turnSpeed , transform.rotation.z); //here we apply the movement related to the rotation of player rb.velocity = transform.right * move.x + transform.up * move.y + transform.forward * move.z; gameObject.transform.rotation = transform.rotation * rotate; diff --git a/Packages/manifest.json b/Packages/manifest.json index 3f5400d..832f674 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -10,6 +10,7 @@ "com.unity.test-framework": "1.1.27", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.4.8", + "com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.21-preview", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 28252f7..5388387 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -106,6 +106,22 @@ }, "url": "https://packages.unity.com" }, + "com.unity.sysroot": { + "version": "0.1.19-preview", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.sysroot.linux-x86_64": { + "version": "0.1.14-preview", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.sysroot": "0.1.18-preview" + }, + "url": "https://packages.unity.com" + }, "com.unity.test-framework": { "version": "1.1.27", "depth": 0, @@ -138,6 +154,16 @@ }, "url": "https://packages.unity.com" }, + "com.unity.toolchain.win-x86_64-linux-x86_64": { + "version": "0.1.21-preview", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.sysroot": "0.1.19-preview", + "com.unity.sysroot.linux-x86_64": "0.1.14-preview" + }, + "url": "https://packages.unity.com" + }, "com.unity.ugui": { "version": "1.0.0", "depth": 0, diff --git a/ProjectSettings/Packages/com.unity.probuilder/Settings.json b/ProjectSettings/Packages/com.unity.probuilder/Settings.json index 987158d..af96b10 100644 --- a/ProjectSettings/Packages/com.unity.probuilder/Settings.json +++ b/ProjectSettings/Packages/com.unity.probuilder/Settings.json @@ -32,6 +32,36 @@ "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "key": "lightmapping.autoUnwrapLightmapUV", "value": "{\"m_Value\":true}" + }, + { + "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", + "key": "editor.backFaceSelectEnabled", + "value": "{\"m_Value\":false}" + }, + { + "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", + "key": "editor.toolbarIconGUI", + "value": "{\"m_Value\":false}" + }, + { + "type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", + "key": "editor.showSceneInfo", + "value": "{\"m_Value\":false}" + }, + { + "type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", + "key": "editor.rectSelectModifier", + "value": "{\"m_Value\":2}" + }, + { + "type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", + "key": "editor.dragSelectRectMode", + "value": "{\"m_Value\":0}" + }, + { + "type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", + "key": "editor.selectMode", + "value": "{\"m_Value\":1}" } ] }