diff --git a/Assets/Prefabs/Cartridge-Interactable.prefab b/Assets/Prefabs/Cartridge-Interactable.prefab index cd68aba..d765727 100644 --- a/Assets/Prefabs/Cartridge-Interactable.prefab +++ b/Assets/Prefabs/Cartridge-Interactable.prefab @@ -997,7 +997,7 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.002 m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &2250823593686253332 +--- !u!1 &2435604583881702577 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1005,47 +1005,51 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3564775497562391856} - - component: {fileID: 8016391999853671649} - - component: {fileID: 7998397566897917024} + - component: {fileID: 4302869671278101265} + - component: {fileID: 6258375363072571426} + - component: {fileID: 1093779681373943276} + - component: {fileID: 4409523614097131505} + - component: {fileID: 4925728291234476624} + - component: {fileID: 5460423599094637711} + - component: {fileID: 5216593285795032141} m_Layer: 0 - m_Name: Debug Visual - Cube + m_Name: ThumbwheelScrollBox m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &3564775497562391856 + m_IsActive: 1 +--- !u!4 &4302869671278101265 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2250823593686253332} + m_GameObject: {fileID: 2435604583881702577} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.02, y: 0.02, z: 0.01} + m_LocalScale: {x: 0.02, y: 0.05, z: 0.02} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 6025561898931304232} + m_Father: {fileID: 5735611471310981830} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &8016391999853671649 +--- !u!33 &6258375363072571426 MeshFilter: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2250823593686253332} + m_GameObject: {fileID: 2435604583881702577} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &7998397566897917024 +--- !u!23 &1093779681373943276 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2250823593686253332} - m_Enabled: 1 + m_GameObject: {fileID: 2435604583881702577} + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -1080,88 +1084,218 @@ MeshRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!1 &2590607307125370813 -GameObject: +--- !u!65 &4409523614097131505 +BoxCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3058993716691409969} - - component: {fileID: 4844416629340556380} - m_Layer: 0 - m_Name: Feedback Effects - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3058993716691409969 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2590607307125370813} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7547124305101930742} - m_Father: {fileID: 7363200301241955007} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &4844416629340556380 + m_GameObject: {fileID: 2435604583881702577} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &4925728291234476624 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2590607307125370813} + m_GameObject: {fileID: 2435604583881702577} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 49e0a5b5ff5540f5b14dd29d46faec22, type: 3} + m_Script: {fileID: 11500000, guid: 115f1a2a50d85cd4b9d6dad4c95622be, type: 3} m_Name: m_EditorClassIdentifier: - m_TransitionDuration: 0.125 - m_InteractableSource: {fileID: 0} - m_IgnoreHoverEvents: 0 - m_IgnoreHoverPriorityEvents: 1 - m_IgnoreFocusEvents: 1 - m_IgnoreSelectEvents: 0 - m_IgnoreActivateEvents: 0 - m_SelectClickAnimationMode: 1 - m_ActivateClickAnimationMode: 1 - m_ClickAnimationDuration: 0.25 - m_ClickAnimationCurve: + m_Interactable: {fileID: 0} + m_PokeCollider: {fileID: 4409523614097131505} + m_PokeConfiguration: m_UseConstant: 1 m_ConstantValue: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 + m_PokeDirection: 4 + m_InteractionDepthOffset: 0 + m_EnablePokeAngleThreshold: 1 + m_PokeAngleThreshold: 45 m_Variable: {fileID: 0} +--- !u!114 &5460423599094637711 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2435604583881702577} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3647f60f096e78e428aa74212dd78d08, type: 3} + m_Name: + m_EditorClassIdentifier: + m_InteractionManager: {fileID: 0} + m_Colliders: [] + m_InteractionLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_InteractionLayers: + m_Bits: 1 + m_DistanceCalculationMode: 1 + m_SelectMode: 0 + m_FocusMode: 1 + m_CustomReticle: {fileID: 0} + m_AllowGazeInteraction: 0 + m_AllowGazeSelect: 0 + m_OverrideGazeTimeToSelect: 0 + m_GazeTimeToSelect: 0.5 + m_OverrideTimeToAutoDeselectGaze: 0 + m_TimeToAutoDeselectGaze: 3 + m_AllowGazeAssistance: 0 + m_FirstHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_LastHoverExited: + m_PersistentCalls: + m_Calls: [] + m_HoverEntered: + m_PersistentCalls: + m_Calls: [] + m_HoverExited: + m_PersistentCalls: + m_Calls: [] + m_FirstSelectEntered: + m_PersistentCalls: + m_Calls: [] + m_LastSelectExited: + m_PersistentCalls: + m_Calls: [] + m_SelectEntered: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 5460423599094637711} + m_TargetAssemblyTypeName: Interactions.XRScroll, Assembly-CSharp + m_MethodName: OnSelected + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_SelectExited: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 5460423599094637711} + m_TargetAssemblyTypeName: Interactions.XRScroll, Assembly-CSharp + m_MethodName: OnUnSelected + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_FirstFocusEntered: + m_PersistentCalls: + m_Calls: [] + m_LastFocusExited: + m_PersistentCalls: + m_Calls: [] + m_FocusEntered: + m_PersistentCalls: + m_Calls: [] + m_FocusExited: + m_PersistentCalls: + m_Calls: [] + m_Activated: + m_PersistentCalls: + m_Calls: [] + m_Deactivated: + m_PersistentCalls: + m_Calls: [] + m_StartingHoverFilters: [] + m_StartingSelectFilters: [] + m_StartingInteractionStrengthFilters: [] + m_OnFirstHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_OnLastHoverExited: + m_PersistentCalls: + m_Calls: [] + m_OnHoverEntered: + m_PersistentCalls: + m_Calls: [] + m_OnHoverExited: + m_PersistentCalls: + m_Calls: [] + m_OnSelectEntered: + m_PersistentCalls: + m_Calls: [] + m_OnSelectExited: + m_PersistentCalls: + m_Calls: [] + m_OnSelectCanceled: + m_PersistentCalls: + m_Calls: [] + m_OnActivate: + m_PersistentCalls: + m_Calls: [] + m_OnDeactivate: + m_PersistentCalls: + m_Calls: [] + scrollAxis: {x: 0, y: 1, z: 0} + scrollScale: 1000 + scrollUpdated: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 6379944510940548408} + m_TargetAssemblyTypeName: RotateTarget, Assembly-CSharp + m_MethodName: Rotate + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 6619281814189739304} + m_TargetAssemblyTypeName: ScaleTarget, Assembly-CSharp + m_MethodName: Scale + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &5216593285795032141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2435604583881702577} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09d904c9a3326044c90622d5ef2ec522, type: 3} + m_Name: + m_EditorClassIdentifier: + interactable: {fileID: 0} + isLocked: 1 --- !u!1 &2672275468392498656 GameObject: m_ObjectHideFlags: 0 @@ -1489,6 +1623,72 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.00025 m_Center: {x: 0, y: 0.00030665586, z: -0.0002064954} +--- !u!1 &3154680338841258142 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5735611471310981830} + - component: {fileID: 6379944510940548408} + - component: {fileID: 6619281814189739304} + m_Layer: 0 + m_Name: ThumbwheelInteraction + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5735611471310981830 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3154680338841258142} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.24230003, y: 0.15429997, z: 0.00948} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4302869671278101265} + m_Father: {fileID: 6554210300994472440} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6379944510940548408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3154680338841258142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc72b4f7852a9c74fabe878aee3e00dd, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 5991556086484635058} + speed: 80 + rotationAxis: {x: 0, y: 1, z: 0} +--- !u!114 &6619281814189739304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3154680338841258142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b0e89717735cc941bfc99a9d14be0d3, type: 3} + m_Name: + m_EditorClassIdentifier: + target: {fileID: 1943633797168437857} + minScale: 1 + maxScale: 8 + scaleAxis: {x: 1, y: 0, z: 0} + speed: 2 --- !u!1 &3184747893969138918 GameObject: m_ObjectHideFlags: 0 @@ -1669,88 +1869,6 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.001 m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &3468872304847212793 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6025561898931304232} - - component: {fileID: 7072597955380376315} - - component: {fileID: 7703760893080629045} - m_Layer: 0 - m_Name: Collider - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &6025561898931304232 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3468872304847212793} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 3564775497562391856} - m_Father: {fileID: 7363200301241955007} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &7072597955380376315 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3468872304847212793} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 0.02, y: 0.02, z: 0.01} - m_Center: {x: 0, y: 0, z: 0} ---- !u!54 &7703760893080629045 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3468872304847212793} - serializedVersion: 4 - m_Mass: 1 - m_Drag: 0 - m_AngularDrag: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 0 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 --- !u!1 &4630323535086491078 GameObject: m_ObjectHideFlags: 0 @@ -2030,7 +2148,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 893407086461366721} - - {fileID: 7363200301241955007} + - {fileID: 5735611471310981830} - {fileID: 4748244553458239309} - {fileID: 4999396423817038611} m_Father: {fileID: 0} @@ -2117,20 +2235,8 @@ MonoBehaviour: focusResponse: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 8303585072692781810} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 1 - m_CallState: 2 - - m_Target: {fileID: 2255873961767694670} - m_TargetAssemblyTypeName: UnityEngine.XR.Interaction.Toolkit.Filtering.XRInteractableFilter, + - m_Target: {fileID: 5216593285795032141} + m_TargetAssemblyTypeName: UnityEngine.XR.Interaction.Toolkit.Filtering.XRInteractableLockingFilter, Assembly-CSharp m_MethodName: set_IsLocked m_Mode: 6 @@ -2160,8 +2266,8 @@ MonoBehaviour: focusResponse: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 2255873961767694670} - m_TargetAssemblyTypeName: UnityEngine.XR.Interaction.Toolkit.Filtering.XRInteractableFilter, + - m_Target: {fileID: 5216593285795032141} + m_TargetAssemblyTypeName: UnityEngine.XR.Interaction.Toolkit.Filtering.XRInteractableLockingFilter, Assembly-CSharp m_MethodName: set_IsLocked m_Mode: 6 @@ -2173,30 +2279,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 1 m_CallState: 2 - - m_Target: {fileID: 7830386353643806963} - m_TargetAssemblyTypeName: UnityEngine.XR.Content.Interaction.XRSlider, Assembly-CSharp - m_MethodName: set_value - m_Mode: 4 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0.5 - m_StringArgument: - m_BoolArgument: 1 - m_CallState: 2 - - m_Target: {fileID: 8303585072692781810} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 --- !u!1 &6318786732990583905 GameObject: m_ObjectHideFlags: 0 @@ -2544,127 +2626,6 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.0015 m_Center: {x: 0, y: 0, z: 0} ---- !u!1 &6396892782732616106 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7547124305101930742} - - component: {fileID: 6583660292157813271} - - component: {fileID: 7311561792949995550} - m_Layer: 0 - m_Name: Visual Feedback - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7547124305101930742 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6396892782732616106} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3058993716691409969} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &6583660292157813271 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6396892782732616106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1410cbaaadf84a7aaa6459d37ad21b3a, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Renderer: {fileID: 4858649905186535133} - m_MaterialIndex: 0 ---- !u!114 &7311561792949995550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6396892782732616106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f86d13fca2ec430d870c0f7765ad0dde, type: 3} - m_Name: - m_EditorClassIdentifier: - m_AffordanceStateProvider: {fileID: 4844416629340556380} - m_ReplaceIdleStateValueWithInitialValue: 0 - m_AffordanceThemeDatum: - m_UseConstant: 1 - m_ConstantValue: - m_StateAnimationCurve: - m_UseConstant: 1 - m_ConstantValue: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - m_Variable: {fileID: 0} - m_List: - - stateName: disabled - animationStateStartValue: {r: 0.5, g: 0.5, b: 0.5, a: 0} - animationStateEndValue: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0} - - stateName: idle - animationStateStartValue: {r: 1, g: 1, b: 1, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - - stateName: hovered - animationStateStartValue: {r: 0, g: 0.7999997, b: 1, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - - stateName: hoveredPriority - animationStateStartValue: {r: 0, g: 0.8, b: 1, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - - stateName: selected - animationStateStartValue: {r: 0, g: 1, b: 0.13333344, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - - stateName: activated - animationStateStartValue: {r: 1, g: 0, b: 0, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - - stateName: focused - animationStateStartValue: {r: 0.9333333, g: 1, b: 0, a: 0} - animationStateEndValue: {r: 1, g: 1, b: 1, a: 0} - m_ColorBlendMode: 0 - m_BlendAmount: 1 - m_Variable: {fileID: 11400000, guid: 591edbd6be1a73b4fab57bd230c3efbf, type: 2} - m_ValueUpdated: - m_PersistentCalls: - m_Calls: [] - m_MaterialPropertyBlockHelper: {fileID: 6583660292157813271} - m_ColorPropertyName: --- !u!1 &6858618951101167954 GameObject: m_ObjectHideFlags: 0 @@ -2946,257 +2907,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 1 m_CallState: 2 ---- !u!1 &8303585072692781810 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7363200301241955007} - - component: {fileID: 7830386353643806963} - - component: {fileID: 7102303252478111488} - - component: {fileID: 8735318517003522812} - - component: {fileID: 5260860923788986581} - - component: {fileID: 2255873961767694670} - m_Layer: 0 - m_Name: Thumbwheel Interact - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &7363200301241955007 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - serializedVersion: 2 - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0.24230003, y: 0.15429997, z: 0.00948} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 6025561898931304232} - - {fileID: 3058993716691409969} - m_Father: {fileID: 6554210300994472440} - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!114 &7830386353643806963 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ebba29281b52eea4cbcfddce0a57f091, type: 3} - m_Name: - m_EditorClassIdentifier: - m_InteractionManager: {fileID: 0} - m_Colliders: [] - m_InteractionLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_InteractionLayers: - m_Bits: 1 - m_DistanceCalculationMode: 1 - m_SelectMode: 0 - m_FocusMode: 1 - m_CustomReticle: {fileID: 0} - m_AllowGazeInteraction: 0 - m_AllowGazeSelect: 0 - m_OverrideGazeTimeToSelect: 0 - m_GazeTimeToSelect: 0.5 - m_OverrideTimeToAutoDeselectGaze: 0 - m_TimeToAutoDeselectGaze: 3 - m_AllowGazeAssistance: 0 - m_FirstHoverEntered: - m_PersistentCalls: - m_Calls: [] - m_LastHoverExited: - m_PersistentCalls: - m_Calls: [] - m_HoverEntered: - m_PersistentCalls: - m_Calls: [] - m_HoverExited: - m_PersistentCalls: - m_Calls: [] - m_FirstSelectEntered: - m_PersistentCalls: - m_Calls: [] - m_LastSelectExited: - m_PersistentCalls: - m_Calls: [] - m_SelectEntered: - m_PersistentCalls: - m_Calls: [] - m_SelectExited: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 7830386353643806963} - m_TargetAssemblyTypeName: UnityEngine.XR.Content.Interaction.XRSlider, Assembly-CSharp - m_MethodName: set_value - m_Mode: 4 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0.5 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - m_FirstFocusEntered: - m_PersistentCalls: - m_Calls: [] - m_LastFocusExited: - m_PersistentCalls: - m_Calls: [] - m_FocusEntered: - m_PersistentCalls: - m_Calls: [] - m_FocusExited: - m_PersistentCalls: - m_Calls: [] - m_Activated: - m_PersistentCalls: - m_Calls: [] - m_Deactivated: - m_PersistentCalls: - m_Calls: [] - m_StartingHoverFilters: [] - m_StartingSelectFilters: [] - m_StartingInteractionStrengthFilters: [] - m_OnFirstHoverEntered: - m_PersistentCalls: - m_Calls: [] - m_OnLastHoverExited: - m_PersistentCalls: - m_Calls: [] - m_OnHoverEntered: - m_PersistentCalls: - m_Calls: [] - m_OnHoverExited: - m_PersistentCalls: - m_Calls: [] - m_OnSelectEntered: - m_PersistentCalls: - m_Calls: [] - m_OnSelectExited: - m_PersistentCalls: - m_Calls: [] - m_OnSelectCanceled: - m_PersistentCalls: - m_Calls: [] - m_OnActivate: - m_PersistentCalls: - m_Calls: [] - m_OnDeactivate: - m_PersistentCalls: - m_Calls: [] - m_Handle: {fileID: 6025561898931304232} - m_Value: 0.5 - m_MaxPosition: 0.02 - m_MinPosition: -0.02 - m_OnValueChange: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 8735318517003522812} - m_TargetAssemblyTypeName: RotateTarget, Assembly-CSharp - m_MethodName: SetDirectionValue - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - - m_Target: {fileID: 5260860923788986581} - m_TargetAssemblyTypeName: ScaleTarget, Assembly-CSharp - m_MethodName: SetDirectionValue - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &7102303252478111488 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ad0e0a86d1c53614b9afe22df0f036f3, type: 3} - m_Name: - m_EditorClassIdentifier: - target: {fileID: 5991556086484635058} - updatePosition: 1 - updateRotation: 0 - updateEveryFrame: 0 - positionOffset: {x: 0.015, y: 0, z: 0} ---- !u!114 &8735318517003522812 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc72b4f7852a9c74fabe878aee3e00dd, type: 3} - m_Name: - m_EditorClassIdentifier: - target: {fileID: 5991556086484635058} - speed: 360 - inputValue: 0 - direction: 0 - invertDirection: 1 ---- !u!114 &5260860923788986581 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3b0e89717735cc941bfc99a9d14be0d3, type: 3} - m_Name: - m_EditorClassIdentifier: - target: {fileID: 1943633797168437857} - minScale: 1 - maxScale: 8 - scaleAxis: {x: 1, y: 0, z: 0} - speed: 20 - inputValue: 0 - direction: 0 - invertDirection: 0 ---- !u!114 &2255873961767694670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8303585072692781810} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 09d904c9a3326044c90622d5ef2ec522, type: 3} - m_Name: - m_EditorClassIdentifier: - interactable: {fileID: 0} - isLocked: 1 --- !u!1 &8312664021365390521 GameObject: m_ObjectHideFlags: 0 @@ -3646,6 +3356,26 @@ PrefabInstance: propertyPath: m_Name value: Cartridge_V3 Variant Interactable objectReference: {fileID: 0} + - target: {fileID: 3414920703166708064, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_ConnectedAnchor.x + value: -1.8304616 + objectReference: {fileID: 0} + - target: {fileID: 3414920703166708064, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_ConnectedAnchor.y + value: 1.5814999 + objectReference: {fileID: 0} + - target: {fileID: 3414920703166708064, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_ConnectedAnchor.z + value: 2.3876 + objectReference: {fileID: 0} + - target: {fileID: 3819015551208540297, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_ConstrainProportionsScale + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5875810263984471138, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6165883632583038797, guid: b27049639847946ddac425fa7721eb71, type: 3} propertyPath: m_Name value: Flip_Pad_Pull_Out (Transform) @@ -3690,6 +3420,34 @@ PrefabInstance: propertyPath: m_InteractionLayers.m_Bits value: 33 objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7070723 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalRotation.x + value: -0.70707244 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalRotation.y + value: -0.0069725197 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalRotation.z + value: 0.0069725793 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -91.13 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 9016411276530573146, guid: b27049639847946ddac425fa7721eb71, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: -90 + objectReference: {fileID: 0} - target: {fileID: 9126189417414843225, guid: b27049639847946ddac425fa7721eb71, type: 3} propertyPath: m_InteractionLayers.m_Bits value: 5 @@ -3763,11 +3521,6 @@ MonoBehaviour: m_EditorClassIdentifier: interactable: {fileID: 0} isLocked: 1 ---- !u!23 &4858649905186535133 stripped -MeshRenderer: - m_CorrespondingSourceObject: {fileID: 7884561136558908469, guid: b27049639847946ddac425fa7721eb71, type: 3} - m_PrefabInstance: {fileID: 3316605137565340392} - m_PrefabAsset: {fileID: 0} --- !u!114 &5809729421961169329 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 9126189417414843225, guid: b27049639847946ddac425fa7721eb71, type: 3} diff --git a/Assets/Scenes/BasicScene.unity b/Assets/Scenes/BasicScene.unity index 3453ebc..9fcdea6 100644 --- a/Assets/Scenes/BasicScene.unity +++ b/Assets/Scenes/BasicScene.unity @@ -490,6 +490,10 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 5827223565076819818, guid: b83677d186e49a64cadef8d7a5a9d3c6, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6899455370481246272, guid: b83677d186e49a64cadef8d7a5a9d3c6, type: 3} propertyPath: m_SizeDelta.x value: 0 diff --git a/Assets/Scripts/Interactions/XRScroll.cs b/Assets/Scripts/Interactions/XRScroll.cs new file mode 100644 index 0000000..40114f2 --- /dev/null +++ b/Assets/Scripts/Interactions/XRScroll.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections; +using TMPro; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.XR.Interaction.Toolkit; + +namespace Interactions +{ + public class XRScroll : XRBaseInteractable + { + private bool isTracking; + + [SerializeField] private Vector3 scrollAxis = Vector3.up; + [SerializeField] private float scrollScale = 1000; + + public UnityEvent scrollUpdated; + + + protected override void OnDisable() + { + base.OnDisable(); + isTracking = false; + StopAllCoroutines(); + } + + + public void OnSelected(SelectEnterEventArgs args) + { + StartCoroutine(TrackScrolling(args.interactorObject.transform)); + } + + private IEnumerator TrackScrolling(Transform mover) + { + if (isTracking) yield break; + isTracking = true; + Vector3 previousPos = mover.position; + + while (isTracking) + { + yield return null; + + Vector3 currentPos = mover.position; + + //Calculate the difference in position only along one axis + Vector3 diff = (previousPos - currentPos); + diff = new Vector3(diff.x * scrollAxis.x, diff.y * scrollAxis.y, diff.z * scrollAxis.z); + float diffTotal = (diff.x + diff.y + diff.z) * scrollScale; + + previousPos = currentPos; + scrollUpdated?.Invoke(diffTotal); + } + } + + public void OnUnSelected(SelectExitEventArgs args) + { + isTracking = false; + } + + + } +} diff --git a/Assets/Scripts/Interactions/XRScroll.cs.meta b/Assets/Scripts/Interactions/XRScroll.cs.meta new file mode 100644 index 0000000..4bbdd15 --- /dev/null +++ b/Assets/Scripts/Interactions/XRScroll.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3647f60f096e78e428aa74212dd78d08 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/RotateTarget.cs b/Assets/Scripts/RotateTarget.cs index 243bb82..5755ae9 100644 --- a/Assets/Scripts/RotateTarget.cs +++ b/Assets/Scripts/RotateTarget.cs @@ -10,25 +10,15 @@ public class RotateTarget : MonoBehaviour [SerializeField] private Transform target; [SerializeField] private float speed = 10f; - [Range(0f, 1f)] - [SerializeField] private float inputValue = 0f; - [Range(-1f, 1f)] - [SerializeField, ReadOnly] private float direction = 0f; - [SerializeField] private bool invertDirection = false; - private void Update() + + [SerializeField] private Vector3 rotationAxis = Vector3.right; + + public void Rotate(float amount) { - if (target == null) return; + amount *= Time.deltaTime; - RemapDirection(); - - target.RotateAround(target.position, target.up, speed * direction * Time.deltaTime); + amount *= speed; + + target.Rotate(rotationAxis,amount); } - - private void RemapDirection(float min = -1f, float max = 1f) - { - direction = Mathf.Lerp(min, max, inputValue); - direction *= invertDirection ? -1f : 1f; - } - - public void SetDirectionValue(float value) => inputValue = value; } diff --git a/Assets/Scripts/ScaleTarget.cs b/Assets/Scripts/ScaleTarget.cs index 774aee8..e83b7d4 100644 --- a/Assets/Scripts/ScaleTarget.cs +++ b/Assets/Scripts/ScaleTarget.cs @@ -14,33 +14,14 @@ public class ScaleTarget : MonoBehaviour [SerializeField] private Vector3 scaleAxis = Vector3.right; [SerializeField] private float speed = 1f; - [Range(0f, 1f)] - [SerializeField] private float inputValue = 0f; - [Range(-1f, 1f)] - [SerializeField, ReadOnly] private float direction = 0f; - [SerializeField] private bool invertDirection = false; - private void Update() + public void Scale(float value) { - if (target == null) return; - - RemapDirection(); - - target.localScale += scaleAxis * (speed * direction * Time.deltaTime); - - // Clamp the scale but only on the scale axis + target.localScale += scaleAxis * (value * speed * Time.deltaTime); var clampedScale = target.localScale; clampedScale.x = Mathf.Clamp(clampedScale.x, minScale, maxScale); clampedScale.y = Mathf.Clamp(clampedScale.y, minScale, maxScale); clampedScale.z = Mathf.Clamp(clampedScale.z, minScale, maxScale); target.localScale = clampedScale; } - - private void RemapDirection(float min = -1f, float max = 1f) - { - direction = Mathf.Lerp(min, max, inputValue); - direction *= invertDirection ? -1f : 1f; - } - - public void SetDirectionValue(float value) => inputValue = value; }