diff --git a/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene - UI Input Module.unity b/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene - UI Input Module.unity index 9d09faa..b3b0af8 100644 --- a/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene - UI Input Module.unity +++ b/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene - UI Input Module.unity @@ -5935,7 +5935,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1419751284} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -5966,12 +5966,12 @@ Camera: y: 0 width: 1 height: 1 - near clip plane: 0.3 + near clip plane: 0.01 far clip plane: 1000 - field of view: 60 + field of view: 80 orthographic: 0 orthographic size: 5 - m_Depth: 0 + m_Depth: 10 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 diff --git a/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene.unity b/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene.unity index 480ef46..4ba50cd 100644 --- a/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene.unity +++ b/XR_Keyboard/Assets/XR_Keyboard/Scenes/ExampleKeyboardScene.unity @@ -5509,10 +5509,10 @@ Camera: height: 1 near clip plane: 0.3 far clip plane: 1000 - field of view: 60 + field of view: 80 orthographic: 0 orthographic size: 5 - m_Depth: 0 + m_Depth: 10 m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 @@ -6537,7 +6537,7 @@ AudioListener: m_Enabled: 1 --- !u!4 &1897774067 Transform: - m_ObjectHideFlags: 8 + m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 411020, guid: 18d6bf9063dcb1842be63f411fd9fc26, type: 2} m_PrefabInstance: {fileID: 0} diff --git a/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs b/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs deleted file mode 100644 index c13adc6..0000000 --- a/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Leap.Unity.Controllers; -using Leap.Unity.Interaction.Keyboard; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UIElements; - -namespace Leap.Unity.Interaction.Storage -{ - public class RelativeToHeadKeyboardSpawner : KeyboardSpawner - { - public Transform head; - public Vector3 DistanceFromHead = new Vector3(0, -0.5f, 0.4f); - public Vector3 Angles; - - private Vector3 targetLocation; - private Quaternion targetRotation; - - private Coroutine moveToRoutine; - - public override void SpawnKeyboard() - { - if (keyboardActive) - { - return; - } - else - { - keyboardActive = true; - } - KeyboardPrefabRoot.SetActive(keyboardActive); - - } - - public override void SpawnKeyboard(Transform currentlySelected) - { - SpawnKeyboard(); - } - - private void SetPosition() - { - - Vector3 newPosition = head.position + (head.forward * DistanceFromHead.z); - newPosition.y = head.position.y + DistanceFromHead.y; - - targetLocation = newPosition; - - if (moveToRoutine != null) - { - StopCoroutine(moveToRoutine); - } - moveToRoutine = StartCoroutine("MoveToTarget"); - } - - private IEnumerator MoveToTarget() - { - while (Vector3.Distance(KeyboardPrefabRoot.transform.position, targetLocation) > 0.005f) - { - KeyboardPrefabRoot.transform.position = Vector3.Lerp(KeyboardPrefabRoot.transform.position, targetLocation, Time.deltaTime * 30); - KeyboardPrefabRoot.transform.rotation = Quaternion.Lerp(KeyboardPrefabRoot.transform.rotation, targetRotation, Time.deltaTime * 30); - - Vector3 pos = KeyboardPrefabRoot.transform.position; - pos.y = head.position.y; - Vector3 forward = pos - head.position; - targetRotation = Quaternion.LookRotation(forward, Vector3.up); - - yield return new WaitForEndOfFrame(); - } - } - } -} \ No newline at end of file diff --git a/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs.meta b/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs.meta deleted file mode 100644 index 1339938..0000000 --- a/XR_Keyboard/Assets/XR_Keyboard/Scripts/Keyboard_Management/RelativeToHeadKeyboardSpawner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 493567c2606f967469a29227a427a55e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: