From 449988bc9ae66d7744e98a4fe4dbda5ff381c339 Mon Sep 17 00:00:00 2001 From: johnppella Date: Tue, 20 Mar 2018 14:58:53 -0700 Subject: [PATCH 01/13] initial checkin for twohandmanipulable migration to master --- .../Scenes/TwoHandManipulationTest.unity | 2651 +++++++++++++++++ .../UX/Materials/Cyan.mat | 175 ++ .../UX/Materials/Emerald.mat | 175 ++ .../UX/Materials/Orange.mat | 172 ++ .../UX/Materials/SampleOrange.mat | 2 +- .../UX/Materials/UIDarkGray.mat | 172 ++ .../Interactions/TwoHandManipulatable.cs | 407 +++ .../Interactions/TwoHandMoveLogic.cs | 96 + .../Interactions/TwoHandRotateLogic.cs | 116 + .../Interactions/TwoHandScaleLogic.cs | 59 + .../UX/Scripts/BoundingBoxes/BoundingBox.cs | 184 +- 11 files changed, 4128 insertions(+), 81 deletions(-) create mode 100644 Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Orange.mat create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs diff --git a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity new file mode 100644 index 00000000000..e9a8732b180 --- /dev/null +++ b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity @@ -0,0 +1,2651 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: 064cf2adabde05941a372e975e563706, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.50224054, g: 0.5020953, b: 0.501867, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 0 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &78828848 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1702150885567096, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 78828849} + - component: {fileID: 78828852} + - component: {fileID: 78828851} + - component: {fileID: 78828850} + m_Layer: 0 + m_Name: Rule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &78828849 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4459327869346566, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 78828848} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -512.82007, y: -322.6673, z: 1.3285} + m_LocalScale: {x: 0.5497447, y: 0.0030726464, z: 1} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &78828850 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 23475067446539832, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 78828848} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &78828851 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 64067504913786168, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 78828848} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &78828852 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 33070690472620464, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 78828848} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &82462508 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1857403430107600, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 82462509} + - component: {fileID: 82462510} + m_Layer: 0 + m_Name: MRTK_Logo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &82462509 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4905320192366726, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82462508} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -512.9825, y: -322.609, z: 1.3330002} + m_LocalScale: {x: 0.013813125, y: 0.01381305, z: 0.008287894} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!212 &82462510 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 212559292570936782, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 82462508} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 21300000, guid: f721996453d888a4db83f0f9f1a4eb7c, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 20, y: 7.48} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 +--- !u!1001 &123576507 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4541142303025740, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: d29bc40b7f3df26479d6a0aac211c355, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &141495573 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1141423118} + m_Modifications: + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.y + value: -1.3600001 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.z + value: -0.87 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_Text + value: 'Rotate Only + + Y axis Constraint' + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_CharacterSize + value: 2.58 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_FontSize + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.x + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.y + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.z + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 1000013198843976, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_Name + value: 3DTextPrefab + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &206123505 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1337778046} + m_Modifications: + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.y + value: -1.3600001 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.z + value: -0.87 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_Text + value: 'Move + Scale + + No Constraints' + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_CharacterSize + value: 2.58 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_FontSize + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.x + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.y + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.z + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 1000013198843976, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_Name + value: 3DTextPrefab + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &494434643 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1076840190721308, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 494434644} + - component: {fileID: 494434648} + - component: {fileID: 494434647} + - component: {fileID: 494434646} + - component: {fileID: 494434645} + m_Layer: 0 + m_Name: Backpanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &494434644 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4851099024189204, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 494434643} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.23, y: 0.13322008, z: -0.004582405} + m_LocalScale: {x: 0.013220016, y: 0.71818995, z: 0.61351055} + m_Children: [] + m_Father: {fileID: 964281201} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!54 &494434645 +Rigidbody: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 54652109647812068, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 494434643} + serializedVersion: 2 + m_Mass: 100 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 +--- !u!23 &494434646 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 23734633781358164, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 494434643} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6cd5a544947cdc240bade30356803bbc, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &494434647 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 65220125403651066, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 494434643} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &494434648 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 33521007365351282, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 494434643} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &520673732 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000011656901714, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 114742747811649402, guid: 3eddd1c29199313478dd3f912bfab2ab, + type: 2} + propertyPath: Cursor + value: + objectReference: {fileID: 1663716339} + - target: {fileID: 114950568511066590, guid: 3eddd1c29199313478dd3f912bfab2ab, + type: 2} + propertyPath: rightHand + value: + objectReference: {fileID: 1198379067318554, guid: cda8fa918eca5054e9cd75c5f023282f, + type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &687798434 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1329454425} + m_Modifications: + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.x + value: -0.418 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.x + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.y + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.z + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 100002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_Name + value: Model_Icosa + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e3a1f0ba5573091499b6781e347904c5, type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_IsPrefabParent: 0 +--- !u!4 &687798435 stripped +Transform: + m_PrefabParentObject: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 687798434} +--- !u!1 &687798436 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 687798434} +--- !u!114 &687798437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 687798436} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6eb034688bcf84b4bb52b3a3310868c3, type: 3} + m_Name: + m_EditorClassIdentifier: + HostTransform: {fileID: 0} + boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, + type: 2} + ManipulationMode: 0 + ConstraintOnRotation: 0 + OneHandMovement: 1 +--- !u!65 &687798438 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 687798436} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &700012313 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1454564949874076, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 700012314} + - component: {fileID: 700012316} + - component: {fileID: 700012315} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &700012314 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224058629180668634, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 700012313} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334956} + m_LocalScale: {x: 0.00050000026, y: 0.0005, z: 0.00050000026} + m_Children: [] + m_Father: {fileID: 1737854001} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.181, y: -322.9009} + m_SizeDelta: {x: 1107.8, y: 1303.4058} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &700012315 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114592574472669386, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 700012313} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 86574c70442309b45be5a1c37a37a40b, type: 3} + m_FontSize: 34 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\n\nTwoHandManipulatable script uses BoundingBoxBasic prefab to visualize + the borders on manipulation interaction. It shows/hides BoundingBoxBasic in OnManipulationStarted + and OnManipulationEnded event.\n\n\n\nYou can interact with the objects using + gestures on HoloLens, or using the motion controller's pointer and trigger button + on immersive headset.\r\n\r\nIn the editor you can interact with the objects by + simulating the right hand using the mouse buttons + left shift key, and the left + hand by using the mouse buttons + space bar. Press both left shift and spacebar + to simulate both hands at the same time." +--- !u!222 &700012316 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222786115559259628, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 700012313} +--- !u!1 &750206442 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1319326335823192, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 750206443} + - component: {fileID: 750206447} + - component: {fileID: 750206446} + - component: {fileID: 750206445} + - component: {fileID: 750206444} + m_Layer: 0 + m_Name: Backpanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &750206443 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4925815908915770, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750206442} + m_LocalRotation: {x: -0, y: 0.7071068, z: -0, w: 0.7071068} + m_LocalPosition: {x: -0.23, y: 0.13322008, z: -0.004582405} + m_LocalScale: {x: 0.013220016, y: 0.71818995, z: 0.61351055} + m_Children: [] + m_Father: {fileID: 1020269081} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!54 &750206444 +Rigidbody: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 54100405396922970, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750206442} + serializedVersion: 2 + m_Mass: 100 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 126 + m_CollisionDetection: 0 +--- !u!23 &750206445 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 23612074761842514, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750206442} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 6cd5a544947cdc240bade30356803bbc, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &750206446 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 65599234300196070, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750206442} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &750206447 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 33590020163061146, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 750206442} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &778537064 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1760878918} +--- !u!64 &778537065 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 778537064} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} +--- !u!1 &785992102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1835462303943884, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 785992103} + - component: {fileID: 785992106} + - component: {fileID: 785992105} + - component: {fileID: 785992104} + m_Layer: 0 + m_Name: TextContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &785992103 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224385282562073920, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785992102} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -1.3525823} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1517590048} + - {fileID: 1379348910} + - {fileID: 78828849} + - {fileID: 1722965371} + - {fileID: 1946117763} + - {fileID: 82462509} + - {fileID: 1331017467} + m_Father: {fileID: 1020269081} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 512.5886, y: 323.03625} + m_SizeDelta: {x: 1025, y: 648} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &785992104 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114803053854114090, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785992102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &785992105 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114747735679590474, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785992102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &785992106 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 223269791768138664, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 785992102} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1 &817891135 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1141423117} +--- !u!64 &817891136 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 817891135} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} +--- !u!1001 &910890641 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1886941384} + m_Modifications: + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.y + value: -1.36 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.z + value: -0.8700001 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_Text + value: 'Scale Only + + No Constraints' + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_CharacterSize + value: 2.58 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_FontSize + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.x + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.y + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.z + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 1000013198843976, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_Name + value: 3DTextPrefab + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &951565652 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1103436554492578, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 951565653} + - component: {fileID: 951565655} + - component: {fileID: 951565654} + m_Layer: 5 + m_Name: Subtitle (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &951565653 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224191356868840390, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951565652} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334941} + m_LocalScale: {x: 0.00049999997, y: 0.00049999997, z: 0.00049999997} + m_Children: [] + m_Father: {fileID: 1737854001} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.181, y: -322.59628} + m_SizeDelta: {x: 1107.8, y: 89.1924} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &951565654 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114392904915671634, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951565652} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e3d8348b7d66bae4aa4b1f3ada3ef5fd, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Bounding Box visualization +--- !u!222 &951565655 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222624442265456234, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 951565652} +--- !u!1 &964281200 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1502550149394970, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 964281201} + m_Layer: 0 + m_Name: Panel2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &964281201 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4706133977960180, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964281200} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.635, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1737854001} + - {fileID: 494434644} + m_Father: {fileID: 1459742327} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1020269080 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1152677137086646, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1020269081} + m_Layer: 0 + m_Name: Panel1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1020269081 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4579641208005124, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020269080} + 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_Children: + - {fileID: 785992103} + - {fileID: 750206443} + m_Father: {fileID: 1459742327} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1020433839 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1020433841} + - component: {fileID: 1020433840} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1020433840 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020433839} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1020433841 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020433839} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1001 &1141423117 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1329454425} + m_Modifications: + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.x + value: 0.588 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.x + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.y + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.z + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 100002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_Name + value: Model_Bucky + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 140e57fb616b0ab47bbcf90e470c76c5, type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_IsPrefabParent: 0 +--- !u!4 &1141423118 stripped +Transform: + m_PrefabParentObject: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1141423117} +--- !u!1 &1141423119 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1141423117} +--- !u!114 &1141423120 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1141423119} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6eb034688bcf84b4bb52b3a3310868c3, type: 3} + m_Name: + m_EditorClassIdentifier: + HostTransform: {fileID: 0} + boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, + type: 2} + ManipulationMode: 2 + ConstraintOnRotation: 0 + OneHandMovement: 1 +--- !u!65 &1141423121 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1141423119} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1329454424 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1329454425} + - component: {fileID: 1329454426} + m_Layer: 0 + m_Name: SceneContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1329454425 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1329454424} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2.37} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1459742327} + - {fileID: 1141423118} + - {fileID: 1886941384} + - {fileID: 1760878919} + - {fileID: 687798435} + - {fileID: 1337778046} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1329454426 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1329454424} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 906323c940a3fad4f8f7e9e4fcd747f4, type: 3} + m_Name: + m_EditorClassIdentifier: + containerObject: {fileID: 0} + alignmentType: 0 + stationarySpaceTypePosition: {x: 0, y: 0, z: 0} + roomScaleSpaceTypePosition: {x: 0, y: 0, z: 0} +--- !u!1 &1331017466 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1579474663996116, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1331017467} + - component: {fileID: 1331017469} + - component: {fileID: 1331017468} + m_Layer: 5 + m_Name: Subtitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1331017467 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224867391563566598, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1331017466} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334941} + m_LocalScale: {x: 0.00050000026, y: 0.0005, z: 0.00050000026} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.82153, y: -322.868} + m_SizeDelta: {x: 1107.8, y: 89.1924} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1331017468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114628746298840300, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1331017466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e3d8348b7d66bae4aa4b1f3ada3ef5fd, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: TwoHandManipulatableScript +--- !u!222 &1331017469 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222081016692326802, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1331017466} +--- !u!1001 &1337778045 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1329454425} + m_Modifications: + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.x + value: -0.735 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.x + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.y + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.z + value: 0.099999994 + objectReference: {fileID: 0} + - target: {fileID: 100002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_Name + value: Model_Bucky + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 140e57fb616b0ab47bbcf90e470c76c5, type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_IsPrefabParent: 0 +--- !u!4 &1337778046 stripped +Transform: + m_PrefabParentObject: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1337778045} +--- !u!1 &1337778047 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1337778045} +--- !u!114 &1337778048 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1337778047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6eb034688bcf84b4bb52b3a3310868c3, type: 3} + m_Name: + m_EditorClassIdentifier: + HostTransform: {fileID: 0} + boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, + type: 2} + ManipulationMode: 1 + ConstraintOnRotation: 2 + OneHandMovement: 1 +--- !u!65 &1337778049 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1337778047} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1360535548 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1337778045} +--- !u!64 &1360535549 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1360535548} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 4300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} +--- !u!1 &1379348909 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1344339051826214, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1379348910} + - component: {fileID: 1379348912} + - component: {fileID: 1379348911} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1379348910 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224856759666131864, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1379348909} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334956} + m_LocalScale: {x: 0.00050000026, y: 0.0005, z: 0.00050000026} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.8215, y: -322.98813} + m_SizeDelta: {x: 1107.8, y: 1000} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1379348911 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114761561608045154, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1379348909} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 86574c70442309b45be5a1c37a37a40b, type: 3} + m_FontSize: 34 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "This example shows how you can make any object interactable with TwoHandManipulatable + script. This script allows for an object to be movable, scalable, and rotatable + with one or two hands. You may also configure the script on only enable certain + manipulations.\r\n\r\n\r\n\r\nIn the Hierarchy panel, you can find different way + to use the TwoHandManipulatable script under SceneContent.\n\nNotice how each + example object has a Collider on it. The collider defines the 'hittable area' + for the manipulatable--grabbing any collidable that is on the script's GameObject + or any descendant will activate the script.\n\nThe script has several configurable + options:\r\n\n- HostTransform: Use this to specify the transform that the scripts + manipulates. By default it is the GameObject that this script is on.\r\n- Manipulation + Mode: Specify the enabled manipulations.\n- Constraint On Rotation: If rotation + is enabled, only rotate on these axes.\n- One Handed Movement: Specify whether + you can use just one hand to move the object." +--- !u!222 &1379348912 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222334294151603570, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1379348909} +--- !u!1001 &1418030804 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1760878919} + m_Modifications: + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.y + value: -1.3600001 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.z + value: -0.87 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_Text + value: 'Move + Rotate + Scale + + No Constraints' + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_CharacterSize + value: 2.58 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_FontSize + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.x + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.y + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.z + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 1000013198843976, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_Name + value: 3DTextPrefab + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1438018012 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1329454425} + m_Modifications: + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.x + value: 0.241 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.x + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.y + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_LocalScale.z + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: e3a1f0ba5573091499b6781e347904c5, type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_IsPrefabParent: 0 +--- !u!1 &1459742326 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1037805327611902, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1459742327} + m_Layer: 0 + m_Name: SceneDescriptionPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1459742327 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4038737183939630, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1459742326} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.17, y: 0.389, z: 0.148} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1020269081} + - {fileID: 964281201} + m_Father: {fileID: 1329454425} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1517590047 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1451936078842708, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1517590048} + - component: {fileID: 1517590050} + - component: {fileID: 1517590049} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1517590048 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224339627565595316, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1517590047} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334941} + m_LocalScale: {x: 0.0005000003, y: 0.0005000001, z: 0.0005000003} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.82153, y: -322.73904} + m_SizeDelta: {x: 1107.8, y: 244.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1517590049 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114257903654940708, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1517590047} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 86574c70442309b45be5a1c37a37a40b, type: 3} + m_FontSize: 78 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Two Handed Manipulation +--- !u!222 &1517590050 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222382184650279478, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1517590047} +--- !u!1 &1565100633 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 1438018012} +--- !u!64 &1565100634 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1565100633} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} +--- !u!1 &1592151106 stripped +GameObject: + m_PrefabParentObject: {fileID: 100004, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 687798434} +--- !u!64 &1592151107 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1592151106} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_InflateMesh: 0 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 4300000, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} +--- !u!1001 &1663716338 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000011792100794, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: a611e772ef8ddf64d8106a9cbb70f31c, type: 2} + m_IsPrefabParent: 0 +--- !u!114 &1663716339 stripped +MonoBehaviour: + m_PrefabParentObject: {fileID: 114611684728110934, guid: a611e772ef8ddf64d8106a9cbb70f31c, + type: 2} + m_PrefabInternal: {fileID: 1663716338} + m_Script: {fileID: 11500000, guid: 0decd33ba8702954885a62b5bc1a778e, type: 3} +--- !u!1001 &1677768352 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 687798435} + m_Modifications: + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.y + value: -1.36 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalPosition.z + value: -0.8700001 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_Text + value: 'Rotate Only + + Z axis Constraint' + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_CharacterSize + value: 2.58 + objectReference: {fileID: 0} + - target: {fileID: 102000010767390410, guid: bfdc7f60d7205c84f82a4806a5352d60, + type: 2} + propertyPath: m_FontSize + value: 103 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.x + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.y + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 4000010330146594, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_LocalScale.z + value: 0.0062999995 + objectReference: {fileID: 0} + - target: {fileID: 1000013198843976, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + propertyPath: m_Name + value: 3DTextPrefab + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: bfdc7f60d7205c84f82a4806a5352d60, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1722965370 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1485382055181008, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1722965371} + - component: {fileID: 1722965373} + - component: {fileID: 1722965372} + m_Layer: 5 + m_Name: WorksOn + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1722965371 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224413024187748670, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1722965370} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334956} + m_LocalScale: {x: 0.0005000003, y: 0.0005000001, z: 0.0005000003} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.6625, y: -322.61212} + m_SizeDelta: {x: 471.4, y: 140.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1722965372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114544788369345886, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1722965370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 2a056e2bb89e0134daaf49e5f183e5dc, type: 3} + m_FontSize: 34 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 101 + m_Alignment: 2 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Works on +--- !u!222 &1722965373 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222602141398920914, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1722965370} +--- !u!1 &1737854000 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1750976490984934, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1737854001} + - component: {fileID: 1737854004} + - component: {fileID: 1737854003} + - component: {fileID: 1737854002} + m_Layer: 0 + m_Name: TextContent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1737854001 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224904040068643104, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1737854000} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -1.3525823} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 700012314} + - {fileID: 1838090888} + - {fileID: 951565653} + m_Father: {fileID: 964281201} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 511.9536, y: 323.03625} + m_SizeDelta: {x: 1025, y: 648} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1737854002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114247302280288692, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1737854000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1737854003 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114119232482227162, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1737854000} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1737854004 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 223336420783637346, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1737854000} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!1001 &1760878918 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1329454425} + m_Modifications: + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.x + value: -0.086 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.x + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.y + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_LocalScale.z + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 2300000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 347544df56dcd64408e75005a6aa0c34, type: 2} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_IsPrefabParent: 0 +--- !u!4 &1760878919 stripped +Transform: + m_PrefabParentObject: {fileID: 400002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1760878918} +--- !u!1 &1760878920 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 5838ea95659d32943afec95550ac1ce1, type: 3} + m_PrefabInternal: {fileID: 1760878918} +--- !u!65 &1760878921 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1760878920} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &1760878922 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1760878920} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6eb034688bcf84b4bb52b3a3310868c3, type: 3} + m_Name: + m_EditorClassIdentifier: + HostTransform: {fileID: 0} + boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, + type: 2} + ManipulationMode: 4 + ConstraintOnRotation: 0 + OneHandMovement: 1 +--- !u!1 &1838090887 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1103436554492578, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1838090888} + - component: {fileID: 1838090890} + - component: {fileID: 1838090889} + m_Layer: 5 + m_Name: Subtitle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1838090888 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224191356868840390, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1838090887} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334941} + m_LocalScale: {x: 0.00050000026, y: 0.0005, z: 0.00050000026} + m_Children: [] + m_Father: {fileID: 1737854001} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.181, y: -322.74075} + m_SizeDelta: {x: 1107.8, y: 89.1924} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1838090889 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114392904915671634, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1838090887} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e3d8348b7d66bae4aa4b1f3ada3ef5fd, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 4 + m_MaxSize: 101 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Running the scene +--- !u!222 &1838090890 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222624442265456234, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1838090887} +--- !u!1 &1886941383 stripped +GameObject: + m_PrefabParentObject: {fileID: 100002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 1438018012} +--- !u!4 &1886941384 stripped +Transform: + m_PrefabParentObject: {fileID: 400002, guid: 284d5c2c421022e4f9056fb0a21ff91c, type: 3} + m_PrefabInternal: {fileID: 1438018012} +--- !u!114 &1886941385 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1886941383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6eb034688bcf84b4bb52b3a3310868c3, type: 3} + m_Name: + m_EditorClassIdentifier: + HostTransform: {fileID: 0} + boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, + type: 2} + ManipulationMode: 1 + ConstraintOnRotation: 3 + OneHandMovement: 1 +--- !u!65 &1886941386 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1886941383} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &1946117762 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1113360108618934, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1946117763} + - component: {fileID: 1946117765} + - component: {fileID: 1946117764} + m_Layer: 5 + m_Name: DeviceTypes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1946117763 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 224644953376245418, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1946117762} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 1.3334941} + m_LocalScale: {x: 0.00050000026, y: 0.0005, z: 0.00050000026} + m_Children: [] + m_Father: {fileID: 785992103} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -512.6625, y: -322.63422} + m_SizeDelta: {x: 471.4, y: 140.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1946117764 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114745954840247250, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1946117762} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 86574c70442309b45be5a1c37a37a40b, type: 3} + m_FontSize: 28 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 101 + m_Alignment: 2 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'HoloLens + + Immersive headset' +--- !u!222 &1946117765 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 222889759466084120, guid: 3404cd77d857d3847a89a11804f185c0, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1946117762} diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat b/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat new file mode 100644 index 00000000000..490594f94f7 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat @@ -0,0 +1,175 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Cyan + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP + _SPECULARHIGHLIGHTS_ON _SPECULAR_HIGHLIGHTS _USEAMBIENT_ON _USEDIFFUSE_ON _USEMAINCOLOR_ON + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + 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} + - _EmissionTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlossMap: + 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} + - _NormalMap: + 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} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlphaTest: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightUsesHoverColor: 1 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _CalibrationSpaceReflections: 0 + - _ClippingPlane: 0 + - _ClippingPlaneBorder: 0 + - _ClippingPlaneBorderWidth: 0.025 + - _ColorWriteMask: 15 + - _Cull: 2 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableEmission: 0 + - _EnableHoverColorOverride: 0 + - _EnableNormalMap: 0 + - _EnvironmentColorIntensity: 0.5 + - _EnvironmentColorThreshold: 1.5 + - _EnvironmentColoring: 0 + - _FadeBeginDistance: 0.85 + - _FadeCompleteDistance: 0.5 + - _ForcePerPixel: 0 + - _Gloss: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _HoverLight: 0 + - _InnerGlow: 0 + - _MainTex_OFFSET: 0 + - _MainTex_SCALE: 0 + - _Metallic: 0 + - _Mode: 0 + - _NearPlaneFade: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ReflectionScale: 2 + - _Reflections: 0 + - _Refraction: 0 + - _RefractiveIndex: 1.1 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.7 + - _RoundCornerMargin: 0 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Shade4: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _Specular: 10 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseAmbient: 1 + - _UseBumpMap: 0 + - _UseDiffuse: 1 + - _UseEmissionColor: 0 + - _UseEmissionMap: 0 + - _UseEmissionTex: 0 + - _UseGlossMap: 0 + - _UseMainColor: 1 + - _UseMainTex: 0 + - _UseOcclusionMap: 0 + - _UseReflections: 0 + - _UseRimLighting: 0 + - _UseSpecular: 0 + - _UseSpecularMap: 0 + - _UseVertexColor: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} + - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0, g: 0.751724, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} + - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} + - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} + - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} + - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} + - _RimColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _SpecularColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _TextureScaleOffset: {r: 1, g: 1, b: 0, a: 0} diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat b/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat new file mode 100644 index 00000000000..9b7cb96d599 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat @@ -0,0 +1,175 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Emerald + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP + _SPECULARHIGHLIGHTS_ON _SPECULAR_HIGHLIGHTS _USEAMBIENT_ON _USEDIFFUSE_ON _USEMAINCOLOR_ON + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + 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} + - _EmissionTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlossMap: + 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} + - _NormalMap: + 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} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlphaTest: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightUsesHoverColor: 1 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _CalibrationSpaceReflections: 0 + - _ClippingPlane: 0 + - _ClippingPlaneBorder: 0 + - _ClippingPlaneBorderWidth: 0.025 + - _ColorWriteMask: 15 + - _Cull: 2 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableEmission: 0 + - _EnableHoverColorOverride: 0 + - _EnableNormalMap: 0 + - _EnvironmentColorIntensity: 0.5 + - _EnvironmentColorThreshold: 1.5 + - _EnvironmentColoring: 0 + - _FadeBeginDistance: 0.85 + - _FadeCompleteDistance: 0.5 + - _ForcePerPixel: 0 + - _Gloss: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _HoverLight: 0 + - _InnerGlow: 0 + - _MainTex_OFFSET: 0 + - _MainTex_SCALE: 0 + - _Metallic: 0 + - _Mode: 0 + - _NearPlaneFade: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ReflectionScale: 2 + - _Reflections: 0 + - _Refraction: 0 + - _RefractiveIndex: 1.1 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.7 + - _RoundCornerMargin: 0 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Shade4: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _Specular: 10 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseAmbient: 1 + - _UseBumpMap: 0 + - _UseDiffuse: 1 + - _UseEmissionColor: 0 + - _UseEmissionMap: 0 + - _UseEmissionTex: 0 + - _UseGlossMap: 0 + - _UseMainColor: 1 + - _UseMainTex: 0 + - _UseOcclusionMap: 0 + - _UseReflections: 0 + - _UseRimLighting: 0 + - _UseSpecular: 0 + - _UseSpecularMap: 0 + - _UseVertexColor: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} + - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0.0058391057, g: 0.7941176, b: 0.6636439, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} + - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} + - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} + - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} + - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} + - _RimColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _SpecularColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _TextureScaleOffset: {r: 1, g: 1, b: 0, a: 0} diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat b/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat new file mode 100644 index 00000000000..9bd0b7ad4d0 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat @@ -0,0 +1,172 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Orange + m_Shader: {fileID: 4800000, guid: d45c0efca53019e43891b0f610f8146e, type: 3} + m_ShaderKeywords: _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT _DISABLE_ALBEDO_MAP + _SPECULARHIGHLIGHTS_ON _SPECULAR_HIGHLIGHTS _USEAMBIENT_ON _USEDIFFUSE_ON _USEMAINCOLOR_ON + m_LightmapFlags: 1 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + 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} + - _EmissionTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlossMap: + 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} + - _NormalMap: + 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} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlphaTest: 0 + - _BlendOp: 0 + - _BorderLight: 0 + - _BorderLightOpaque: 0 + - _BorderLightUsesHoverColor: 1 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.1 + - _BumpScale: 1 + - _CalibrationSpaceReflections: 0 + - _ClippingPlane: 0 + - _ClippingPlaneBorder: 0 + - _ClippingPlaneBorderWidth: 0.025 + - _ColorWriteMask: 15 + - _Cull: 2 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableEmission: 0 + - _EnableHoverColorOverride: 0 + - _EnableNormalMap: 0 + - _EnvironmentColorIntensity: 0.5 + - _EnvironmentColorThreshold: 1.5 + - _EnvironmentColoring: 0 + - _FadeBeginDistance: 0.85 + - _FadeCompleteDistance: 0.5 + - _ForcePerPixel: 0 + - _Gloss: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _HoverLight: 0 + - _InnerGlow: 0 + - _MainTex_OFFSET: 0 + - _MainTex_SCALE: 0 + - _Metallic: 0 + - _Mode: 0 + - _NearPlaneFade: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ReflectionScale: 2 + - _Reflections: 0 + - _Refraction: 0 + - _RefractiveIndex: 1.1 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.7 + - _RoundCornerMargin: 0 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Shade4: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _Specular: 10 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseAmbient: 1 + - _UseBumpMap: 0 + - _UseDiffuse: 1 + - _UseEmissionColor: 0 + - _UseEmissionMap: 0 + - _UseEmissionTex: 0 + - _UseGlossMap: 0 + - _UseMainColor: 1 + - _UseMainTex: 0 + - _UseOcclusionMap: 0 + - _UseReflections: 0 + - _UseRimLighting: 0 + - _UseSpecular: 0 + - _UseSpecularMap: 0 + - _UseVertexColor: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} + - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 1, g: 0.6413793, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} + - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} + - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} + - _HoverColorOverride: {r: 1, g: 1, b: 1, a: 1} + - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} + - _RimColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _SpecularColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _TextureScaleOffset: {r: 1, g: 1, b: 0, a: 0} diff --git a/Assets/HoloToolkit-Examples/UX/Materials/SampleOrange.mat b/Assets/HoloToolkit-Examples/UX/Materials/SampleOrange.mat index 9bcdf964aa8..4abc15b59c8 100644 --- a/Assets/HoloToolkit-Examples/UX/Materials/SampleOrange.mat +++ b/Assets/HoloToolkit-Examples/UX/Materials/SampleOrange.mat @@ -7,7 +7,7 @@ Material: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_Name: SampleOrange - m_Shader: {fileID: 4800000, guid: 30a212a88e1063a428c85e50b1e427f2, type: 3} + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: _EMISSION _USEAMBIENT_ON _USEDIFFUSE_ON _USEMAINCOLOR_ON m_LightmapFlags: 1 m_EnableInstancingVariants: 0 diff --git a/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat b/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat new file mode 100644 index 00000000000..b991df571d9 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat @@ -0,0 +1,172 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: UIDarkGray + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _BORDER_LIGHT _BORDER_LIGHT_USES_HOVER_COLOR _DIRECTIONAL_LIGHT + _DISABLE_ALBEDO_MAP _HOVER_LIGHT _SPECULARHIGHLIGHTS_ON _SPECULAR_HIGHLIGHTS _USEAMBIENT_ON + _USEDIFFUSE_ON _USEMAINCOLOR_ON + m_LightmapFlags: 1 + m_EnableInstancingVariants: 1 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CubeMap: + m_Texture: {fileID: 0} + 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} + - _EmissionTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _GlossMap: + 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} + - _NormalMap: + 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} + - _SpecularMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _AlbedoAlphaMode: 0 + - _AlphaTest: 0 + - _BlendOp: 0 + - _BorderLight: 1 + - _BorderLightOpaque: 0 + - _BorderLightUsesHoverColor: 1 + - _BorderMinValue: 0.1 + - _BorderWidth: 0.5 + - _BumpScale: 1 + - _CalibrationSpaceReflections: 0 + - _ClippingPlane: 0 + - _ClippingPlaneBorder: 0 + - _ClippingPlaneBorderWidth: 0.025 + - _ColorWriteMask: 15 + - _Cull: 2 + - _CullMode: 2 + - _CustomMode: 0 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DirectionalLight: 1 + - _DstBlend: 0 + - _EdgeSmoothingValue: 0.002 + - _EnableEmission: 0 + - _EnableHoverColorOverride: 0 + - _EnableNormalMap: 0 + - _EnvironmentColorIntensity: 0.5 + - _EnvironmentColorThreshold: 1.5 + - _EnvironmentColoring: 0 + - _FadeBeginDistance: 0.85 + - _FadeCompleteDistance: 0.5 + - _ForcePerPixel: 0 + - _Gloss: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _HoverLight: 1 + - _InnerGlow: 0 + - _MainTex_OFFSET: 0 + - _MainTex_SCALE: 0 + - _Metallic: 0 + - _Mode: 0 + - _NearPlaneFade: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _ReflectionScale: 2 + - _Reflections: 0 + - _Refraction: 0 + - _RefractiveIndex: 1.1 + - _RenderQueueOverride: -1 + - _RimLight: 0 + - _RimPower: 0.7 + - _RoundCornerMargin: 0 + - _RoundCornerRadius: 0.25 + - _RoundCorners: 0 + - _Shade4: 0 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _Specular: 10 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _UseAmbient: 1 + - _UseBumpMap: 0 + - _UseDiffuse: 1 + - _UseEmissionColor: 0 + - _UseEmissionMap: 0 + - _UseEmissionTex: 0 + - _UseGlossMap: 0 + - _UseMainColor: 1 + - _UseMainTex: 0 + - _UseOcclusionMap: 0 + - _UseReflections: 0 + - _UseRimLighting: 0 + - _UseSpecular: 0 + - _UseSpecularMap: 0 + - _UseVertexColor: 0 + - _ZTest: 4 + - _ZWrite: 1 + m_Colors: + - _ClipPlane: {r: 0, g: 1, b: 0, a: 0} + - _ClippingPlaneBorderColor: {r: 1, g: 0.2, b: 0, a: 1} + - _Color: {r: 0.2352941, g: 0.2352941, b: 0.2352941, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EnvironmentColorX: {r: 1, g: 0, b: 0, a: 1} + - _EnvironmentColorY: {r: 0, g: 1, b: 0, a: 1} + - _EnvironmentColorZ: {r: 0, g: 0, b: 1, a: 1} + - _HoverColorOverride: {r: 0.3019608, g: 0.3019608, b: 0.3, a: 0.003921569} + - _InnerGlowColor: {r: 1, g: 1, b: 1, a: 0.75} + - _RimColor: {r: 1, g: 1, b: 1, a: 1} + - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _SpecularColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _TextureScaleOffset: {r: 1, g: 1, b: 0, a: 0} diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs new file mode 100644 index 00000000000..ebbd3ca6006 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using HoloToolkit.Unity.InputModule; +using HoloToolkit.Unity.UX; +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Assertions; + + +namespace HoloToolkit.Unity.InputModule.Utilities.Interations +{ + /// + /// This script allows for an object to be movable, scalable, and rotatable with one or two hands. + /// You may also configure the script on only enable certain manipulations. The script works with + /// both HoloLens' gesture input and immersive headset's motion controller input. + /// See Assets/MixedRealityToolkit-Examples/Input/Readme/README_TwoHandManipulationTest.md + /// for instructions on how to use the script. + /// + public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHandler + { + // Event that gets raised when user begins manipulating the object + public event Action StartedManipulating; + // Event that gets raised when the user ends manipulation + public event Action StoppedManipulating; + + [SerializeField] + [Tooltip("Transform that will be dragged. Defaults to the object of the component.")] + private Transform HostTransform = null; + + [SerializeField] + [Tooltip("To visualize the object bounding box, drop the HoloToolKit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] + private BoundingBox boundingBoxPrefab = null; + + public enum TwoHandedManipulation + { + Scale, + Rotate, + MoveScale, + RotateScale, + MoveRotateScale + }; + + [SerializeField] + [Tooltip("What manipulation will two hands perform?")] + private TwoHandedManipulation ManipulationMode = TwoHandedManipulation.Scale; + + [SerializeField] + [Tooltip("Constrain rotation along an axis")] + private TwoHandRotateLogic.RotationConstraint ConstraintOnRotation = TwoHandRotateLogic.RotationConstraint.None; + + [SerializeField] + [Tooltip("If true, grabbing the object with one hand will initiate movement.")] + private bool OneHandMovement = true; + + [Flags] + private enum State + { + Start = 0x000, + Moving = 0x001, + Scaling = 0x010, + Rotating = 0x100, + MovingScaling = 0x011, + RotatingScaling = 0x110, + MovingRotatingScaling = 0x111 + }; + + private BoundingBox boundingBoxInstance; + private State currentState; + private TwoHandMoveLogic m_moveLogic; + private TwoHandScaleLogic m_scaleLogic; + private TwoHandRotateLogic m_rotateLogic; + // Maps input id -> position of hand + private readonly Dictionary m_handsPressedLocationsMap = new Dictionary(); + // Maps input id -> input source. Then obtain position of input source using currentInputSource.TryGetGripPosition(currentInputSourceId, out inputPosition); + private readonly Dictionary m_handsPressedInputSourceMap = new Dictionary(); + + public BoundingBox BoundingBoxPrefab + { + set + { + boundingBoxPrefab = value; + } + + get + { + return boundingBoxPrefab; + } + } + + public void SetManipulationMode(TwoHandedManipulation mode) + { + ManipulationMode = mode; + } + + private void Awake() + { + m_moveLogic = new TwoHandMoveLogic(); + m_rotateLogic = new TwoHandRotateLogic(ConstraintOnRotation); + m_scaleLogic = new TwoHandScaleLogic(); + } + + private void Start() + { + if (HostTransform == null) + { + HostTransform = transform; + } + } + + private void Update() + { + // Update positions of all hands + foreach (var key in m_handsPressedInputSourceMap.Keys) + { + var inputSource = m_handsPressedInputSourceMap[key]; + Vector3 inputPosition = Vector3.zero; + if (inputSource.TryGetGripPosition(key, out inputPosition)) + { + m_handsPressedLocationsMap[key] = inputPosition; + } + } + + if (currentState != State.Start) + { + UpdateStateMachine(); + } + } + + private bool showBoundingBox + { + set + { + if (boundingBoxPrefab != null) + { + if (boundingBoxInstance == null) + { + // Instantiate Bounding Box from the Prefab + boundingBoxInstance = Instantiate(boundingBoxPrefab) as BoundingBox; + } + + if (value) + { + boundingBoxInstance.Target = this.gameObject; + boundingBoxInstance.gameObject.SetActive(true); + } + else + { + boundingBoxInstance.Target = null; + boundingBoxInstance.gameObject.SetActive(false); + } + } + } + } + + private Vector3 GetInputPosition(InputEventData eventData) + { + Vector3 result = Vector3.zero; + eventData.InputSource.TryGetGripPosition(eventData.SourceId, out result); + return result; + } + + public void OnInputDown(InputEventData eventData) + { + // Add to hand map + m_handsPressedLocationsMap[eventData.SourceId] = GetInputPosition(eventData); + m_handsPressedInputSourceMap[eventData.SourceId] = eventData.InputSource; + UpdateStateMachine(); + eventData.Use(); + } + + public void OnInputUp(InputEventData eventData) + { + RemoveSourceIdFromHandMap(eventData.SourceId); + UpdateStateMachine(); + eventData.Use(); + } + + public void OnSourceDetected(SourceStateEventData eventData) + { + } + + private void RemoveSourceIdFromHandMap(uint sourceId) + { + if (m_handsPressedLocationsMap.ContainsKey(sourceId)) + { + m_handsPressedLocationsMap.Remove(sourceId); + } + + if (m_handsPressedInputSourceMap.ContainsKey(sourceId)) + { + m_handsPressedInputSourceMap.Remove(sourceId); + } + } + + public void OnSourceLost(SourceStateEventData eventData) + { + RemoveSourceIdFromHandMap(eventData.SourceId); + UpdateStateMachine(); + eventData.Use(); + } + + private void UpdateStateMachine() + { + var handsPressedCount = m_handsPressedLocationsMap.Count; + State newState = currentState; + switch (currentState) + { + case State.Start: + case State.Moving: + if (handsPressedCount == 0) + { + newState = State.Start; + } + else + if (handsPressedCount == 1 && OneHandMovement) + { + newState = State.Moving; + } + else if (handsPressedCount > 1) + { + switch (ManipulationMode) + { + case TwoHandedManipulation.Scale: + newState = State.Scaling; + break; + case TwoHandedManipulation.Rotate: + newState = State.Rotating; + break; + case TwoHandedManipulation.MoveScale: + newState = State.MovingScaling; + break; + case TwoHandedManipulation.RotateScale: + newState = State.RotatingScaling; + break; + case TwoHandedManipulation.MoveRotateScale: + newState = State.MovingRotatingScaling; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + break; + case State.Scaling: + case State.Rotating: + case State.MovingScaling: + case State.RotatingScaling: + case State.MovingRotatingScaling: + // TODO: if < 2, make this go to start state ('drop it') + if (handsPressedCount == 0) + { + newState = State.Start; + } + else if (handsPressedCount == 1) + { + newState = State.Moving; + } + break; + default: + throw new ArgumentOutOfRangeException(); + } + InvokeStateUpdateFunctions(currentState, newState); + currentState = newState; + } + private void InvokeStateUpdateFunctions(State oldState, State newState) + { + if (newState != oldState) + { + switch (newState) + { + case State.Moving: + OnOneHandMoveStarted(); + break; + case State.Start: + OnManipulationEnded(); + break; + case State.RotatingScaling: + case State.MovingRotatingScaling: + case State.Scaling: + case State.Rotating: + case State.MovingScaling: + OnTwoHandManipulationStarted(newState); + break; + } + switch (oldState) + { + case State.Start: + OnManipulationStarted(); + break; + case State.Scaling: + case State.Rotating: + case State.RotatingScaling: + case State.MovingRotatingScaling: + case State.MovingScaling: + OnTwoHandManipulationEnded(); + break; + } + } + else + { + switch (newState) + { + case State.Moving: + OnOneHandMoveUpdated(); + break; + case State.Scaling: + case State.Rotating: + case State.RotatingScaling: + case State.MovingRotatingScaling: + case State.MovingScaling: + OnTwoHandManipulationUpdated(); + break; + default: + break; + } + } + } + + private void OnTwoHandManipulationUpdated() + { + var targetRotation = HostTransform.rotation; + var targetPosition = HostTransform.position; + var targetScale = HostTransform.localScale; + + if ((currentState & State.Moving) > 0) + { + targetPosition = m_moveLogic.Update(GetHandsCentroid(), targetPosition); + } + if ((currentState & State.Rotating) > 0) + { + targetRotation = m_rotateLogic.Update(m_handsPressedLocationsMap, HostTransform, targetRotation); + } + if ((currentState & State.Scaling) > 0) + { + targetScale = m_scaleLogic.Update(m_handsPressedLocationsMap); + } + + HostTransform.position = targetPosition; + HostTransform.rotation = targetRotation; + HostTransform.localScale = targetScale; + } + + private void OnOneHandMoveUpdated() + { + var targetPosition = m_moveLogic.Update(m_handsPressedLocationsMap.Values.First(), HostTransform.position); + + HostTransform.position = targetPosition; + } + + private void OnTwoHandManipulationEnded() + { + } + + private Vector3 GetHandsCentroid() + { + Vector3 result = m_handsPressedLocationsMap.Values.Aggregate(Vector3.zero, (current, state) => current + state); + return result / m_handsPressedLocationsMap.Count; + } + + private void OnTwoHandManipulationStarted(State newState) + { + if ((newState & State.Rotating) > 0) + { + m_rotateLogic.Setup(m_handsPressedLocationsMap, HostTransform); + } + if ((newState & State.Moving) > 0) + { + m_moveLogic.Setup(GetHandsCentroid(), HostTransform); + } + if ((newState & State.Scaling) > 0) + { + m_scaleLogic.Setup(m_handsPressedLocationsMap, HostTransform); + } + } + + private void OnOneHandMoveStarted() + { + Assert.IsTrue(m_handsPressedLocationsMap.Count == 1); + + m_moveLogic.Setup(m_handsPressedLocationsMap.Values.First(), HostTransform); + } + private void OnManipulationStarted() + { + if (StartedManipulating != null) + { + StartedManipulating(); + } + InputManager.Instance.PushModalInputHandler(gameObject); + + //Show Bounding Box visual on manipulation interaction + showBoundingBox = true; + } + private void OnManipulationEnded() + { + if (StoppedManipulating != null) + { + StoppedManipulating(); + } + InputManager.Instance.PopModalInputHandler(); + + //Hide Bounding Box visual on release + showBoundingBox = false; + } + } +} diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs new file mode 100644 index 00000000000..5d1c9cf99bc --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + + +using UnityEngine; + +namespace HoloToolkit.Unity.InputModule.Utilities.Interations +{ + /// + /// Implements a movement logic that uses the model of angular rotations along a sphere whose + /// radius varies. The angle to move by is computed by looking at how much the hand changes + /// relative to a pivot point (slightly below and in front of the head). + /// + /// Usage: + /// When a manipulation starts, call Setup. + /// Call Update any time to update the move logic and get a new rotation for the object. + /// + public class TwoHandMoveLogic + { + private float m_handRefDistance; + private float m_objRefDistance; + /// + /// The initial angle between the hand and the object + /// + private Quaternion m_gazeAngularOffset; + /// + /// The initial object position + /// + private Vector3 m_draggingPosition; + + private const float DistanceScale = 2f; + + public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) + { + var newHandPosition = startHandPositionMeters; + + // The pivot is just below and in front of the head. + var pivotPosition = GetHandPivotPosition(); + + m_handRefDistance = Vector3.Distance(newHandPosition, pivotPosition); + m_objRefDistance = Vector3.Distance(manipulationRoot.position, pivotPosition); + + var objDirectoin = Vector3.Normalize(manipulationRoot.position - pivotPosition); + var handDirection = Vector3.Normalize(newHandPosition - pivotPosition); + + // We transform the forward vector of the object, the direction of the object, and the direction of the hand + // to camera space so everything is relative to the user's perspective. + objDirectoin = CameraCache.Main.transform.InverseTransformDirection(objDirectoin); + handDirection = CameraCache.Main.transform.InverseTransformDirection(handDirection); + + // Store the original rotation between the hand an object + m_gazeAngularOffset = Quaternion.FromToRotation(handDirection, objDirectoin); + m_draggingPosition = manipulationRoot.position; + } + + public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) + { + var newHandPosition = centroid; + var pivotPosition = GetHandPivotPosition(); + + // Compute the pivot -> hand vector in camera space + var newHandDirection = Vector3.Normalize(newHandPosition - pivotPosition); + newHandDirection = CameraCache.Main.transform.InverseTransformDirection(newHandDirection); + + // The direction the object should face is the current hand direction rotated by the original hand -> object rotation. + var targetDirection = Vector3.Normalize(m_gazeAngularOffset * newHandDirection); + targetDirection = CameraCache.Main.transform.TransformDirection(targetDirection); + + // Compute how far away the object should be based on the ratio of the current to original hand distance + var currentHandDistance = Vector3.Magnitude(newHandPosition - pivotPosition); + var distanceRatio = currentHandDistance / m_handRefDistance; + var distanceOffset = distanceRatio > 0 ? (distanceRatio - 1f) * DistanceScale : 0; + var targetDistance = m_objRefDistance + distanceOffset; + + var newPosition = pivotPosition + (targetDirection * targetDistance); + + var newDistance = Vector3.Distance(newPosition, pivotPosition); + if (newDistance > 4f) + { + newPosition = pivotPosition + Vector3.Normalize(newPosition - pivotPosition) * 4f; + } + + m_draggingPosition = newPosition; + + + return m_draggingPosition; + } + + /// A point that is below and just in front of the head. + public static Vector3 GetHandPivotPosition() + { + Vector3 pivot = CameraCache.Main.transform.position + new Vector3(0, -0.2f, 0) - CameraCache.Main.transform.forward * 0.2f; // a bit lower and behind + return pivot; + } + } +} diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs new file mode 100644 index 00000000000..fe517e43437 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Assertions; + +namespace HoloToolkit.Unity.InputModule.Utilities.Interations +{ + /// + /// Implements common logic for rotating holograms using a handlebar metaphor. + /// each frame, object_rotation_delta = rotation_delta(current_hands_vector, previous_hands_vector) + /// where hands_vector is the vector between two hand/controller positions. + /// + /// Usage: + /// When a manipulation starts, call Setup. + /// Call Update any time to update the move logic and get a new rotation for the object. + /// + public class TwoHandRotateLogic + { + private const float MinHandDistanceForPitchM = 0.1f; + private const float RotationMultiplier = 2f; + public enum RotationConstraint + { + None, + XAxisOnly, + YAxisOnly, + ZAxisOnly + }; + + private readonly RotationConstraint m_rotationConstraint; + /// + /// The current rotation constraint might be modified based on disambiguation logic, for example + /// XOrYBasedOnInitialHandPosition might change the current rotation constraint based on the + /// initial hand positions at the start + /// + private RotationConstraint m_currentRotationConstraint; + public RotationConstraint GetCurrentRotationConstraint() + { + return m_currentRotationConstraint; + } + private Vector3 m_previousHandlebarRotation; + + public TwoHandRotateLogic(RotationConstraint rotationConstraint) + { + m_rotationConstraint = rotationConstraint; + } + + public void Setup(Dictionary handsPressedMap, Transform manipulationRoot) + { + m_currentRotationConstraint = m_rotationConstraint; + m_previousHandlebarRotation = GetHandlebarDirection(handsPressedMap, manipulationRoot); + } + + private Vector3 ProjectHandlebarGivenConstraint(RotationConstraint constraint, Vector3 handlebarRotation, Transform manipulationRoot) + { + Vector3 result = handlebarRotation; + switch (constraint) + { + case RotationConstraint.XAxisOnly: + result.x = 0; + break; + case RotationConstraint.YAxisOnly: + result.y = 0; + break; + case RotationConstraint.ZAxisOnly: + result.z = 0; + break; + } + return CameraCache.Main.transform.TransformDirection(result); + } + + private Vector3 GetHandlebarDirection(Dictionary handsPressedMap, Transform manipulationRoot) + { + Assert.IsTrue(handsPressedMap.Count > 1); + var handsEnumerator = handsPressedMap.Values.GetEnumerator(); + handsEnumerator.MoveNext(); + var hand1 = handsEnumerator.Current; + handsEnumerator.MoveNext(); + var hand2 = handsEnumerator.Current; + + // We project the handlebar direction into camera space because otherwise when we move our body the handlebard will move even + // though, relative to our heads, the handlebar is not moving. + hand1 = CameraCache.Main.transform.InverseTransformPoint(hand1); + hand2 = CameraCache.Main.transform.InverseTransformPoint(hand2); + + return hand2 - hand1; + } + + public Quaternion Update(Dictionary handsPressedMap, Transform manipulationRoot, Quaternion currentRotation) + { + var handlebarDirection = GetHandlebarDirection(handsPressedMap, manipulationRoot); + var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(m_currentRotationConstraint, handlebarDirection, + manipulationRoot); + var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(m_currentRotationConstraint, + m_previousHandlebarRotation, manipulationRoot); + m_previousHandlebarRotation = handlebarDirection; + + var rotationDelta = Quaternion.FromToRotation(prevHandlebarDirectionProjected, handlebarDirectionProjected); + + var angle = 0f; + var axis = Vector3.zero; + rotationDelta.ToAngleAxis(out angle, out axis); + angle *= RotationMultiplier; + + if (m_currentRotationConstraint == RotationConstraint.YAxisOnly) + { + // If we are rotating about Y axis, then make sure we rotate about global Y axis. + // Since the angle is obtained from a quaternion, we need to properly orient it (up or down) based + // on the original axis-angle representation. + axis = Vector3.up * Vector3.Dot(axis, Vector3.up); + } + return Quaternion.AngleAxis(angle, axis) * currentRotation; + } + } +} diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs new file mode 100644 index 00000000000..4a4245e2b93 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +using System.Collections.Generic; +using UnityEngine; + +namespace HoloToolkit.Unity.InputModule.Utilities.Interations +{ + /// + /// Implements a scale logic that will scale an object based on the + /// ratio of the distance between hands. + /// object_scale = start_object_scale * curr_hand_dist / start_hand_dist + /// + /// Usage: + /// When a manipulation starts, call Setup. + /// Call Update any time to update the move logic and get a new rotation for the object. + /// + public class TwoHandScaleLogic + { + private Vector3 m_startObjectScale; + private float m_startHandDistanceMeters; + + public virtual void Setup(Dictionary handsPressedMap, Transform manipulationRoot) + { + m_startHandDistanceMeters = GetMinDistanceBetweenHands(handsPressedMap); + m_startObjectScale = manipulationRoot.transform.localScale; + } + + /// + /// Finds the minimum distance between all pairs of hands + /// + /// + private float GetMinDistanceBetweenHands(Dictionary handsPressedMap) + { + var result = float.MaxValue; + Vector3[] handLocations = new Vector3[handsPressedMap.Values.Count]; + handsPressedMap.Values.CopyTo(handLocations, 0); + for (int i = 0; i < handLocations.Length; i++) + { + for (int j = i + 1; j < handLocations.Length; j++) + { + var distance = Vector3.Distance(handLocations[i], handLocations[j]); + if (distance < result) + { + result = distance; + } + } + } + return result; + } + + public virtual Vector3 Update(Dictionary handsPressedMap) + { + var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; + return m_startObjectScale * ratioMultiplier; + } + + } +} diff --git a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs index df512ee9d50..6fbceba39a5 100644 --- a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs +++ b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs @@ -3,7 +3,6 @@ // Licensed under the MIT License. See LICENSE in the project root for license information. // using System; - using System.Collections.Generic; using UnityEngine; @@ -31,16 +30,69 @@ public enum FlattenModeEnum FlattenAuto, // Flatten the smallest relative axis if it falls below threshold } - #region public + [Header("Objects")] + [Tooltip("The target object")] + [SerializeField] + protected GameObject target; + + [Tooltip("The transform used to scale the bounding box (will be auto-generated)")] + [SerializeField] + protected Transform scaleTransform = null; + + [Header("Flattening & Padding")] + [Tooltip("Flattening behavior setting.")] + [SerializeField] + protected FlattenModeEnum flattenPreference = FlattenModeEnum.FlattenAuto; + + [Tooltip("The relative % size of an axis must meet before being auto-flattened")] + [SerializeField] + protected float flattenAxisThreshold = 0.025f; + + [Tooltip("The relative % size of a flattened axis")] + [SerializeField] + protected float flattenedAxisThickness = 0.01f; + + [Tooltip("How much to pad the scale of the box to fit around objects (as % of largest dimension)")] + [SerializeField] + protected float scalePadding = 0.05f; + + [Tooltip("How much to pad the scale of the box on an axis that's flattened")] + [SerializeField] + protected float flattenedScalePadding = 0f; + + [Header("Bounds Calculation")] + [Tooltip("Method used to calculate the bounds of the object.")] + [SerializeField] + protected BoundsCalculationMethodEnum boundsCalculationMethod = BoundsCalculationMethodEnum.MeshFilterBounds; + + [Tooltip("Any renderers on this layer will be ignored when calculating object bounds")] + [SerializeField] + protected LayerMask ignoreLayers = (1 << 2); // Ignore Raycast Layer + + protected Vector3 targetBoundsWorldCenter = Vector3.zero; + + protected Vector3 targetBoundsLocalScale = Vector3.zero; + + protected Bounds localTargetBounds = new Bounds(); + + protected List boundsPoints = new List(); + + protected FlattenModeEnum flattenedAxis = FlattenModeEnum.DoNotFlatten; + + protected bool isVisible = true; + + protected Renderer rendererForVisibility; public Action OnFlattenedAxisChange; - public virtual FlattenModeEnum FlattenPreference { + public virtual FlattenModeEnum FlattenPreference + { get { return flattenPreference; } set { flattenPreference = value; } } - public virtual BoundsCalculationMethodEnum BoundsCalculationMethod { + public virtual BoundsCalculationMethodEnum BoundsCalculationMethod + { get { return boundsCalculationMethod; } set { boundsCalculationMethod = value; } } @@ -63,7 +115,8 @@ public virtual GameObject Target target = value; } - if (!isActiveAndEnabled) { + if (!isActiveAndEnabled) + { return; } @@ -110,6 +163,31 @@ public Vector3 TargetBoundsLocalScale } } + /// + /// Sets the bounding box invisible while not interrupting + /// the computation of bounds points. + /// + public bool IsVisible + { + get + { + return isVisible; + } + set + { + if (rendererForVisibility == null) + { + Transform scale = transform.GetChild(0); + Transform rig = scale.GetChild(0); + GameObject rigobject = rig.gameObject; + rendererForVisibility = rigobject.gameObject.GetComponent(); + } + + rendererForVisibility.enabled = value; + isVisible = value; + } + } + /// /// The current flattened axis, if any /// @@ -124,68 +202,15 @@ protected set if (flattenedAxis != value) { flattenedAxis = value; - if (OnFlattenedAxisChange != null) { + if (OnFlattenedAxisChange != null) + { OnFlattenedAxisChange(); } } } } - #endregion - - #region protected - - [Header("Objects")] - [Tooltip("The target object")] - [SerializeField] - protected GameObject target; - - [Tooltip("The transform used to scale the bounding box (will be auto-generated)")] - [SerializeField] - protected Transform scaleTransform = null; - - [Header("Flattening & Padding")] - [Tooltip("Flattening behavior setting.")] - [SerializeField] - protected FlattenModeEnum flattenPreference = FlattenModeEnum.FlattenAuto; - - [Tooltip("The relative % size of an axis must meet before being auto-flattened")] - [SerializeField] - protected float flattenAxisThreshold = 0.025f; - - [Tooltip("The relative % size of a flattened axis")] - [SerializeField] - protected float flattenedAxisThickness = 0.01f; - - [Tooltip("How much to pad the scale of the box to fit around objects (as % of largest dimension)")] - [SerializeField] - protected float scalePadding = 0.05f; - - [Tooltip("How much to pad the scale of the box on an axis that's flattened")] - [SerializeField] - protected float flattenedScalePadding = 0f; - - [Header("Bounds Calculation")] - [Tooltip("Method used to calculate the bounds of the object.")] - [SerializeField] - protected BoundsCalculationMethodEnum boundsCalculationMethod = BoundsCalculationMethodEnum.MeshFilterBounds; - - [Tooltip("Any renderers on this layer will be ignored when calculating object bounds")] - [SerializeField] - protected LayerMask ignoreLayers = (1 << 2); // Ignore Raycast Layer - - protected Vector3 targetBoundsWorldCenter = Vector3.zero; - protected Vector3 targetBoundsLocalScale = Vector3.zero; - - protected Bounds localTargetBounds = new Bounds(); - protected List boundsPoints = new List(); - - protected FlattenModeEnum flattenedAxis = FlattenModeEnum.DoNotFlatten; - - #endregion - - #region private - + #region /// /// Override so we're not overwhelmed by button gizmos /// @@ -220,11 +245,13 @@ protected virtual void Update() protected virtual void CreateTransforms() { - if (scaleTransform == null) { + if (scaleTransform == null) + { scaleTransform = transform.Find("Scale"); } - if (scaleTransform == null) { + if (scaleTransform == null) + { scaleTransform = new GameObject("Scale").transform; } @@ -288,26 +315,33 @@ protected virtual void RefreshTargetBounds() UpdateFlattenedAxis(); } - protected virtual void UpdateFlattenedAxis() { + protected virtual void UpdateFlattenedAxis() + { // Find the maximum size of the new bounds float maxAxisThickness = Mathf.Max(Mathf.Max(targetBoundsLocalScale.x, targetBoundsLocalScale.y), targetBoundsLocalScale.z); FlattenModeEnum newFlattenedAxis = FlattenModeEnum.DoNotFlatten; - switch (flattenPreference) { + switch (flattenPreference) + { case FlattenModeEnum.DoNotFlatten: // Do nothing break; case FlattenModeEnum.FlattenAuto: // Flattening order of preference - z, y, x - if (Mathf.Abs(targetBoundsLocalScale.z / maxAxisThickness) < flattenAxisThreshold) { + if (Mathf.Abs(targetBoundsLocalScale.z / maxAxisThickness) < flattenAxisThreshold) + { newFlattenedAxis = FlattenModeEnum.FlattenZ; targetBoundsLocalScale.z = flattenedAxisThickness * maxAxisThickness; - } else if (Mathf.Abs(targetBoundsLocalScale.y / maxAxisThickness) < flattenAxisThreshold) { + } + else if (Mathf.Abs(targetBoundsLocalScale.y / maxAxisThickness) < flattenAxisThreshold) + { newFlattenedAxis = FlattenModeEnum.FlattenY; targetBoundsLocalScale.y = flattenedAxisThickness * maxAxisThickness; - } else if (Mathf.Abs(targetBoundsLocalScale.x / maxAxisThickness) < flattenAxisThreshold) { + } + else if (Mathf.Abs(targetBoundsLocalScale.x / maxAxisThickness) < flattenAxisThreshold) + { newFlattenedAxis = FlattenModeEnum.FlattenX; targetBoundsLocalScale.x = flattenedAxisThickness * maxAxisThickness; } @@ -338,7 +372,8 @@ protected virtual void UpdateFlattenedAxis() { protected virtual void UpdateScaleTransform() { // If we don't have a target, nothing to do here - if (target == null) { + if (target == null) + { return; } // Get position of object based on renderers @@ -379,15 +414,10 @@ protected virtual void UpdateScaleTransform() scale.z += (largestDimension * flattenedScalePadding); break; } - - scaleTransform.localScale = scale; - Vector3 rotation = target.transform.eulerAngles; - transform.eulerAngles = rotation; } - #endregion #region static utility functions @@ -496,11 +526,5 @@ public static void GetMeshFilterBoundsPoints(GameObject target, List bo #endregion - #region custom editor -#if UNITY_EDITOR - [UnityEditor.CustomEditor(typeof(BoundingBox))] - public class CustomEditor : MRTKEditor { } -#endif - #endregion } } \ No newline at end of file From b19851247723daa6870ec2b7d01145f2c9094995 Mon Sep 17 00:00:00 2001 From: johnppella Date: Tue, 20 Mar 2018 15:38:36 -0700 Subject: [PATCH 02/13] intial checkin adding meta file --- .../Input/Scenes/TwoHandManipulationTest.unity.meta | 9 +++++++++ .../HoloToolkit-Examples/UX/Materials/Cyan.mat.meta | 10 ++++++++++ .../UX/Materials/Emerald.mat.meta | 10 ++++++++++ .../UX/Materials/Orange.mat.meta | 10 ++++++++++ .../UX/Materials/UIDarkGray.mat.meta | 10 ++++++++++ .../Interactions/TwoHandManipulatable.cs.meta | 13 +++++++++++++ .../Utilities/Interactions/TwoHandMoveLogic.cs.meta | 13 +++++++++++++ .../Interactions/TwoHandRotateLogic.cs.meta | 13 +++++++++++++ .../Interactions/TwoHandScaleLogic.cs.meta | 13 +++++++++++++ 9 files changed, 101 insertions(+) create mode 100644 Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity.meta create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat.meta create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat.meta create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/Orange.mat.meta create mode 100644 Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat.meta create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs.meta create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs.meta create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs.meta create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs.meta diff --git a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity.meta b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity.meta new file mode 100644 index 00000000000..7ee1be16a41 --- /dev/null +++ b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1af37bd294e891849ac89f7e7c534fef +timeCreated: 1521579995 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat.meta b/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat.meta new file mode 100644 index 00000000000..0f1fe894a01 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Cyan.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 140e57fb616b0ab47bbcf90e470c76c5 +timeCreated: 1521580861 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat.meta b/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat.meta new file mode 100644 index 00000000000..97df3493051 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Emerald.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e3a1f0ba5573091499b6781e347904c5 +timeCreated: 1521580861 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat.meta b/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat.meta new file mode 100644 index 00000000000..07ffc0785c8 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/Orange.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6ab60e3691aafad4aa29bb08550b96d6 +timeCreated: 1521580861 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat.meta b/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat.meta new file mode 100644 index 00000000000..758af9e0274 --- /dev/null +++ b/Assets/HoloToolkit-Examples/UX/Materials/UIDarkGray.mat.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6cd5a544947cdc240bade30356803bbc +timeCreated: 1521581045 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs.meta b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs.meta new file mode 100644 index 00000000000..6aade8042b1 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 6eb034688bcf84b4bb52b3a3310868c3 +timeCreated: 1521580188 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs.meta b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs.meta new file mode 100644 index 00000000000..bfc9a14a3ab --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: c2d970bce90ece2438ce537131f18b43 +timeCreated: 1521580606 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs.meta b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs.meta new file mode 100644 index 00000000000..d2d031096d5 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 963c381d3e202174da6820518398062b +timeCreated: 1521580606 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs.meta b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs.meta new file mode 100644 index 00000000000..294db7909bf --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: a383fb7ae702465469bec73106431d70 +timeCreated: 1521580606 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From e45ae2ae1b7827faf4f0b9a223fdce8a35625f67 Mon Sep 17 00:00:00 2001 From: Dong Yoon Park Date: Tue, 20 Mar 2018 15:54:09 -0700 Subject: [PATCH 03/13] Scene refinement. --- .../Input/Scenes/TwoHandManipulationTest.unity | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity index e9a8732b180..18d4bdb76ea 100644 --- a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity +++ b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.50224054, g: 0.5020953, b: 0.501867, a: 1} + m_IndirectSpecularColor: {r: 0.50217825, g: 0.5020953, b: 0.5018046, a: 1} --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 @@ -715,8 +715,8 @@ MonoBehaviour: HostTransform: {fileID: 0} boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, type: 2} - ManipulationMode: 0 - ConstraintOnRotation: 0 + ManipulationMode: 1 + ConstraintOnRotation: 3 OneHandMovement: 1 --- !u!65 &687798438 BoxCollider: @@ -1428,8 +1428,8 @@ MonoBehaviour: HostTransform: {fileID: 0} boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, type: 2} - ManipulationMode: 2 - ConstraintOnRotation: 0 + ManipulationMode: 1 + ConstraintOnRotation: 2 OneHandMovement: 1 --- !u!65 &1141423121 BoxCollider: @@ -1655,8 +1655,8 @@ MonoBehaviour: HostTransform: {fileID: 0} boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, type: 2} - ManipulationMode: 1 - ConstraintOnRotation: 2 + ManipulationMode: 2 + ConstraintOnRotation: 0 OneHandMovement: 1 --- !u!65 &1337778049 BoxCollider: @@ -2554,8 +2554,8 @@ MonoBehaviour: HostTransform: {fileID: 0} boundingBoxPrefab: {fileID: 114030465538688920, guid: 865a8ded6c47efd4285f04f3aebe99e9, type: 2} - ManipulationMode: 1 - ConstraintOnRotation: 3 + ManipulationMode: 0 + ConstraintOnRotation: 0 OneHandMovement: 1 --- !u!65 &1886941386 BoxCollider: From e7abb112e232bec9357cb66f5132666aaeb55d27 Mon Sep 17 00:00:00 2001 From: johnppella Date: Mon, 26 Mar 2018 10:56:00 -0700 Subject: [PATCH 04/13] colocation --- .../Interactions/TwoHandManipulatable.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index ebbd3ca6006..c7a27b5d04a 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -34,6 +34,19 @@ public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHa [Tooltip("To visualize the object bounding box, drop the HoloToolKit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] private BoundingBox boundingBoxPrefab = null; + public BoundingBox BoundingBoxPrefab + { + set + { + boundingBoxPrefab = value; + } + + get + { + return boundingBoxPrefab; + } + } + public enum TwoHandedManipulation { Scale, @@ -77,19 +90,6 @@ private enum State // Maps input id -> input source. Then obtain position of input source using currentInputSource.TryGetGripPosition(currentInputSourceId, out inputPosition); private readonly Dictionary m_handsPressedInputSourceMap = new Dictionary(); - public BoundingBox BoundingBoxPrefab - { - set - { - boundingBoxPrefab = value; - } - - get - { - return boundingBoxPrefab; - } - } - public void SetManipulationMode(TwoHandedManipulation mode) { ManipulationMode = mode; From 1d4b2da235dad569e2ee5332716a3abbb4a1a063 Mon Sep 17 00:00:00 2001 From: johnppella Date: Mon, 26 Mar 2018 10:57:05 -0700 Subject: [PATCH 05/13] changes for PR --- .../Scripts/Utilities/Interactions/TwoHandManipulatable.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index c7a27b5d04a..0f78562a6b7 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -16,7 +16,7 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interations /// This script allows for an object to be movable, scalable, and rotatable with one or two hands. /// You may also configure the script on only enable certain manipulations. The script works with /// both HoloLens' gesture input and immersive headset's motion controller input. - /// See Assets/MixedRealityToolkit-Examples/Input/Readme/README_TwoHandManipulationTest.md + /// See Assets/HoloToolkit-Examples/Input/Readme/README_TwoHandManipulationTest.md /// for instructions on how to use the script. /// public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHandler @@ -90,6 +90,7 @@ private enum State // Maps input id -> input source. Then obtain position of input source using currentInputSource.TryGetGripPosition(currentInputSourceId, out inputPosition); private readonly Dictionary m_handsPressedInputSourceMap = new Dictionary(); + public void SetManipulationMode(TwoHandedManipulation mode) { ManipulationMode = mode; @@ -112,7 +113,7 @@ private void Start() private void Update() { - // Update positions of all hands + //Update positions of all hands foreach (var key in m_handsPressedInputSourceMap.Keys) { var inputSource = m_handsPressedInputSourceMap[key]; From f982b359942b31808f2b959ab2e32e0722b415cb Mon Sep 17 00:00:00 2001 From: Dong Yoon Park Date: Mon, 26 Mar 2018 11:11:42 -0700 Subject: [PATCH 06/13] Resolved material conflict issue. --- .../Input/Scenes/TwoHandManipulationTest.unity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity index 18d4bdb76ea..bd2f9c4ec58 100644 --- a/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity +++ b/Assets/HoloToolkit-Examples/Input/Scenes/TwoHandManipulationTest.unity @@ -537,7 +537,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_Materials: - - {fileID: 2100000, guid: 6cd5a544947cdc240bade30356803bbc, type: 2} + - {fileID: 2100000, guid: 61c598ddff7a2cc4ea50c285c361691d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -880,7 +880,7 @@ MeshRenderer: m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_Materials: - - {fileID: 2100000, guid: 6cd5a544947cdc240bade30356803bbc, type: 2} + - {fileID: 2100000, guid: 61c598ddff7a2cc4ea50c285c361691d, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 From 7bdf20ab5b8e880ccf72a123ae09f112b2d93471 Mon Sep 17 00:00:00 2001 From: johnppella Date: Thu, 29 Mar 2018 13:51:39 -0700 Subject: [PATCH 07/13] PR requested changes made: moved public Enum to separate file add summary tags to public properties/methods/events encapsulation spelling and re-ordering --- .../Interactions/AffineConstraintEnums.cs | 28 ++++ .../Interactions/TwoHandManipulatable.cs | 138 ++++++++++++------ .../Interactions/TwoHandMoveLogic.cs | 20 ++- .../Interactions/TwoHandRotateLogic.cs | 84 +++++++---- .../Interactions/TwoHandScaleLogic.cs | 10 ++ 5 files changed, 202 insertions(+), 78 deletions(-) create mode 100644 Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs new file mode 100644 index 00000000000..2f8bcc4ba94 --- /dev/null +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +namespace HoloToolkit.Unity.InputModule.Utilities.Interations +{ + /// + /// Enum for Axis Constraints + /// + public enum AxisConstraint + { + /// + /// Transform all axes. + /// + None, + /// + /// Constrain to X-Axis. + /// + XAxisOnly, + /// + /// Constrain to Y-Axis. + /// + YAxisOnly, + /// + /// Constrain to Z-Axis. + /// + ZAxisOnly + }; +} \ No newline at end of file diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index 0f78562a6b7..15732bc1a17 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -21,9 +21,14 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interations /// public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHandler { - // Event that gets raised when user begins manipulating the object + /// + /// Event that gets raised when user begins manipulating the object + /// public event Action StartedManipulating; - // Event that gets raised when the user ends manipulation + + /// + /// Event that gets raised when the user ends manipulation + /// public event Action StoppedManipulating; [SerializeField] @@ -34,6 +39,9 @@ public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHa [Tooltip("To visualize the object bounding box, drop the HoloToolKit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] private BoundingBox boundingBoxPrefab = null; + /// + /// Reference to the Prefab from which clone is instantiated. + /// public BoundingBox BoundingBoxPrefab { set @@ -47,6 +55,9 @@ public BoundingBox BoundingBoxPrefab } } + /// + /// + /// public enum TwoHandedManipulation { Scale, @@ -62,7 +73,7 @@ public enum TwoHandedManipulation [SerializeField] [Tooltip("Constrain rotation along an axis")] - private TwoHandRotateLogic.RotationConstraint ConstraintOnRotation = TwoHandRotateLogic.RotationConstraint.None; + private AxisConstraint ConstraintOnRotation = AxisConstraint.None; [SerializeField] [Tooltip("If true, grabbing the object with one hand will initiate movement.")] @@ -80,22 +91,65 @@ private enum State MovingRotatingScaling = 0x111 }; + /// + /// private properties that store transform information. + /// private BoundingBox boundingBoxInstance; private State currentState; private TwoHandMoveLogic m_moveLogic; private TwoHandScaleLogic m_scaleLogic; private TwoHandRotateLogic m_rotateLogic; - // Maps input id -> position of hand + + /// + /// Maps input id -> position of hand + /// private readonly Dictionary m_handsPressedLocationsMap = new Dictionary(); - // Maps input id -> input source. Then obtain position of input source using currentInputSource.TryGetGripPosition(currentInputSourceId, out inputPosition); + + /// + /// Maps input id -> input source. Then obtain position of input source using currentInputSource.TryGetGripPosition(currentInputSourceId, out inputPosition); + /// private readonly Dictionary m_handsPressedInputSourceMap = new Dictionary(); + /// + /// Property that turns on and off the Visibility of the BoundingBox cloned from the BoundingBoxPrefab reference. + /// + private bool ShowBoundingBox + { + set + { + if (boundingBoxPrefab != null) + { + if (boundingBoxInstance == null) + { + // Instantiate Bounding Box from the Prefab + boundingBoxInstance = Instantiate(boundingBoxPrefab) as BoundingBox; + } + if (value) + { + boundingBoxInstance.Target = this.gameObject; + boundingBoxInstance.gameObject.SetActive(true); + } + else + { + boundingBoxInstance.Target = null; + boundingBoxInstance.gameObject.SetActive(false); + } + } + } + } + + /// + /// SetManipulationMode + /// public void SetManipulationMode(TwoHandedManipulation mode) { ManipulationMode = mode; } + /// + /// Private Methods + /// private void Awake() { m_moveLogic = new TwoHandMoveLogic(); @@ -130,32 +184,6 @@ private void Update() } } - private bool showBoundingBox - { - set - { - if (boundingBoxPrefab != null) - { - if (boundingBoxInstance == null) - { - // Instantiate Bounding Box from the Prefab - boundingBoxInstance = Instantiate(boundingBoxPrefab) as BoundingBox; - } - - if (value) - { - boundingBoxInstance.Target = this.gameObject; - boundingBoxInstance.gameObject.SetActive(true); - } - else - { - boundingBoxInstance.Target = null; - boundingBoxInstance.gameObject.SetActive(false); - } - } - } - } - private Vector3 GetInputPosition(InputEventData eventData) { Vector3 result = Vector3.zero; @@ -163,6 +191,22 @@ private Vector3 GetInputPosition(InputEventData eventData) return result; } + private void RemoveSourceIdFromHandMap(uint sourceId) + { + if (m_handsPressedLocationsMap.ContainsKey(sourceId)) + { + m_handsPressedLocationsMap.Remove(sourceId); + } + + if (m_handsPressedInputSourceMap.ContainsKey(sourceId)) + { + m_handsPressedInputSourceMap.Remove(sourceId); + } + } + + /// + /// /// Event Handler receives input from inputSource + /// public void OnInputDown(InputEventData eventData) { // Add to hand map @@ -172,6 +216,9 @@ public void OnInputDown(InputEventData eventData) eventData.Use(); } + /// + /// Event Handler receives input from inputSource + /// public void OnInputUp(InputEventData eventData) { RemoveSourceIdFromHandMap(eventData.SourceId); @@ -179,23 +226,16 @@ public void OnInputUp(InputEventData eventData) eventData.Use(); } + /// + /// OnSourceDetected Event Handler + /// public void OnSourceDetected(SourceStateEventData eventData) { } - private void RemoveSourceIdFromHandMap(uint sourceId) - { - if (m_handsPressedLocationsMap.ContainsKey(sourceId)) - { - m_handsPressedLocationsMap.Remove(sourceId); - } - - if (m_handsPressedInputSourceMap.ContainsKey(sourceId)) - { - m_handsPressedInputSourceMap.Remove(sourceId); - } - } - + /// + /// OnSourceLost + /// public void OnSourceLost(SourceStateEventData eventData) { RemoveSourceIdFromHandMap(eventData.SourceId); @@ -203,6 +243,9 @@ public void OnSourceLost(SourceStateEventData eventData) eventData.Use(); } + /// + /// private Event Handlers + /// private void UpdateStateMachine() { var handsPressedCount = m_handsPressedLocationsMap.Count; @@ -265,6 +308,7 @@ private void UpdateStateMachine() InvokeStateUpdateFunctions(currentState, newState); currentState = newState; } + private void InvokeStateUpdateFunctions(State oldState, State newState) { if (newState != oldState) @@ -382,6 +426,7 @@ private void OnOneHandMoveStarted() m_moveLogic.Setup(m_handsPressedLocationsMap.Values.First(), HostTransform); } + private void OnManipulationStarted() { if (StartedManipulating != null) @@ -391,8 +436,9 @@ private void OnManipulationStarted() InputManager.Instance.PushModalInputHandler(gameObject); //Show Bounding Box visual on manipulation interaction - showBoundingBox = true; + ShowBoundingBox = true; } + private void OnManipulationEnded() { if (StoppedManipulating != null) @@ -402,7 +448,7 @@ private void OnManipulationEnded() InputManager.Instance.PopModalInputHandler(); //Hide Bounding Box visual on release - showBoundingBox = false; + ShowBoundingBox = false; } } } diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs index 5d1c9cf99bc..af013f08287 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. - using UnityEngine; namespace HoloToolkit.Unity.InputModule.Utilities.Interations @@ -19,17 +18,23 @@ public class TwoHandMoveLogic { private float m_handRefDistance; private float m_objRefDistance; + private const float DistanceScale = 2f; + /// /// The initial angle between the hand and the object /// private Quaternion m_gazeAngularOffset; + /// /// The initial object position /// private Vector3 m_draggingPosition; - private const float DistanceScale = 2f; - + /// + /// Initialize system with controller/hand states- starting position and current Transform. + /// + /// + /// public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) { var newHandPosition = startHandPositionMeters; @@ -53,6 +58,12 @@ public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) m_draggingPosition = manipulationRoot.position; } + /// + /// Updates gameobject with new position information of controller/hand + /// + /// + /// + /// a Vector3 describing the updated current Position of the gameObject being two-hand manipulated public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) { var newHandPosition = centroid; @@ -86,7 +97,10 @@ public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) return m_draggingPosition; } + /// + /// gets current controller/hand position /// A point that is below and just in front of the head. + /// public static Vector3 GetHandPivotPosition() { Vector3 pivot = CameraCache.Main.transform.position + new Vector3(0, -0.2f, 0) - CameraCache.Main.transform.forward * 0.2f; // a bit lower and behind diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs index fe517e43437..e4ce0a6ca6f 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs @@ -18,52 +18,48 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interations /// public class TwoHandRotateLogic { + /// + /// Private variables + /// private const float MinHandDistanceForPitchM = 0.1f; private const float RotationMultiplier = 2f; - public enum RotationConstraint - { - None, - XAxisOnly, - YAxisOnly, - ZAxisOnly - }; + private readonly AxisConstraint m_rotationConstraint; + private Vector3 m_previousHandlebarRotation; - private readonly RotationConstraint m_rotationConstraint; /// /// The current rotation constraint might be modified based on disambiguation logic, for example /// XOrYBasedOnInitialHandPosition might change the current rotation constraint based on the /// initial hand positions at the start /// - private RotationConstraint m_currentRotationConstraint; - public RotationConstraint GetCurrentRotationConstraint() - { - return m_currentRotationConstraint; - } - private Vector3 m_previousHandlebarRotation; + private AxisConstraint currentRotationConstraint; - public TwoHandRotateLogic(RotationConstraint rotationConstraint) - { - m_rotationConstraint = rotationConstraint; - } - - public void Setup(Dictionary handsPressedMap, Transform manipulationRoot) + /// + /// Public Accessor for AxisConstraint Property used to constrain Rotation to an axis. + /// + public AxisConstraint CurrentRotationConstraint { - m_currentRotationConstraint = m_rotationConstraint; - m_previousHandlebarRotation = GetHandlebarDirection(handsPressedMap, manipulationRoot); + get + { + return currentRotationConstraint; + } + set + { + currentRotationConstraint = value; + } } - private Vector3 ProjectHandlebarGivenConstraint(RotationConstraint constraint, Vector3 handlebarRotation, Transform manipulationRoot) + private Vector3 ProjectHandlebarGivenConstraint(AxisConstraint constraint, Vector3 handlebarRotation, Transform manipulationRoot) { Vector3 result = handlebarRotation; switch (constraint) { - case RotationConstraint.XAxisOnly: + case AxisConstraint.XAxisOnly: result.x = 0; break; - case RotationConstraint.YAxisOnly: + case AxisConstraint.YAxisOnly: result.y = 0; break; - case RotationConstraint.ZAxisOnly: + case AxisConstraint.ZAxisOnly: result.z = 0; break; } @@ -87,12 +83,42 @@ private Vector3 GetHandlebarDirection(Dictionary handsPressedMap, return hand2 - hand1; } + /// + /// Sets Axis Constraint for Rotation operation. + /// + /// + public TwoHandRotateLogic(AxisConstraint rotationConstraint) + { + m_rotationConstraint = rotationConstraint; + } + + /// + /// Initializes twohand system with controller/hand source info: + /// the Dictionary collection already filled with controller/hand info, + /// and the Transform of the GameObject to be manipulated. + /// + /// + /// + public void Setup(Dictionary handsPressedMap, Transform manipulationRoot) + { + currentRotationConstraint = m_rotationConstraint; + m_previousHandlebarRotation = GetHandlebarDirection(handsPressedMap, manipulationRoot); + } + + + /// + /// Updates internal states based on current Controller/hand states. + /// + /// + /// + /// + /// public Quaternion Update(Dictionary handsPressedMap, Transform manipulationRoot, Quaternion currentRotation) { var handlebarDirection = GetHandlebarDirection(handsPressedMap, manipulationRoot); - var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(m_currentRotationConstraint, handlebarDirection, + var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, handlebarDirection, manipulationRoot); - var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(m_currentRotationConstraint, + var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, m_previousHandlebarRotation, manipulationRoot); m_previousHandlebarRotation = handlebarDirection; @@ -103,7 +129,7 @@ public Quaternion Update(Dictionary handsPressedMap, Transform ma rotationDelta.ToAngleAxis(out angle, out axis); angle *= RotationMultiplier; - if (m_currentRotationConstraint == RotationConstraint.YAxisOnly) + if (currentRotationConstraint == AxisConstraint.YAxisOnly) { // If we are rotating about Y axis, then make sure we rotate about global Y axis. // Since the angle is obtained from a quaternion, we need to properly orient it (up or down) based diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index 4a4245e2b93..9e9c99eb26d 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -20,6 +20,11 @@ public class TwoHandScaleLogic private Vector3 m_startObjectScale; private float m_startHandDistanceMeters; + /// + /// Initialize system with source info from controllers/hands + /// + /// + /// public virtual void Setup(Dictionary handsPressedMap, Transform manipulationRoot) { m_startHandDistanceMeters = GetMinDistanceBetweenHands(handsPressedMap); @@ -49,6 +54,11 @@ private float GetMinDistanceBetweenHands(Dictionary handsPressedM return result; } + /// + /// update Gameobject with new Scale state + /// + /// + /// public virtual Vector3 Update(Dictionary handsPressedMap) { var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; From 6b3eceb955718541fab22c5f64cba87f533573f5 Mon Sep 17 00:00:00 2001 From: johnppella Date: Fri, 30 Mar 2018 14:37:31 -0700 Subject: [PATCH 08/13] PR changes summary blocks for private functions. colocated public property with its private documented parameters and return values in functions set scaleTransform --- .../Interactions/TwoHandMoveLogic.cs | 24 ++--- .../Interactions/TwoHandRotateLogic.cs | 71 ++++++++------ .../Interactions/TwoHandScaleLogic.cs | 8 +- .../UX/Scripts/BoundingBoxes/BoundingBox.cs | 96 ++++++++++++++++--- 4 files changed, 143 insertions(+), 56 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs index af013f08287..45bbc246a33 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -16,8 +16,11 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interations /// public class TwoHandMoveLogic { - private float m_handRefDistance; - private float m_objRefDistance; + /// + /// private variables + /// + private float handRefDistance; + private float objRefDistance; private const float DistanceScale = 2f; /// @@ -33,8 +36,8 @@ public class TwoHandMoveLogic /// /// Initialize system with controller/hand states- starting position and current Transform. /// - /// - /// + /// starting position of Controllers/Hands which determine orientation + /// Transform of gameObject being manipulated public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) { var newHandPosition = startHandPositionMeters; @@ -42,8 +45,8 @@ public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) // The pivot is just below and in front of the head. var pivotPosition = GetHandPivotPosition(); - m_handRefDistance = Vector3.Distance(newHandPosition, pivotPosition); - m_objRefDistance = Vector3.Distance(manipulationRoot.position, pivotPosition); + handRefDistance = Vector3.Distance(newHandPosition, pivotPosition); + objRefDistance = Vector3.Distance(manipulationRoot.position, pivotPosition); var objDirectoin = Vector3.Normalize(manipulationRoot.position - pivotPosition); var handDirection = Vector3.Normalize(newHandPosition - pivotPosition); @@ -61,8 +64,8 @@ public void Setup(Vector3 startHandPositionMeters, Transform manipulationRoot) /// /// Updates gameobject with new position information of controller/hand /// - /// - /// + /// center of translation to be used for Manipulation + /// position of gameobject to be manipulated /// a Vector3 describing the updated current Position of the gameObject being two-hand manipulated public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) { @@ -79,9 +82,9 @@ public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) // Compute how far away the object should be based on the ratio of the current to original hand distance var currentHandDistance = Vector3.Magnitude(newHandPosition - pivotPosition); - var distanceRatio = currentHandDistance / m_handRefDistance; + var distanceRatio = currentHandDistance / handRefDistance; var distanceOffset = distanceRatio > 0 ? (distanceRatio - 1f) * DistanceScale : 0; - var targetDistance = m_objRefDistance + distanceOffset; + var targetDistance = objRefDistance + distanceOffset; var newPosition = pivotPosition + (targetDirection * targetDistance); @@ -93,7 +96,6 @@ public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) m_draggingPosition = newPosition; - return m_draggingPosition; } diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs index e4ce0a6ca6f..a63eee8a375 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs @@ -22,9 +22,23 @@ public class TwoHandRotateLogic /// Private variables /// private const float MinHandDistanceForPitchM = 0.1f; + + /// + /// a scalar applied to Rotation angle generated by handlebar calculations. + /// private const float RotationMultiplier = 2f; - private readonly AxisConstraint m_rotationConstraint; - private Vector3 m_previousHandlebarRotation; + + /// + /// This enum value stores the initial constraint specified as an argument in the Constructor. + /// It may be overridden by runtime conditions. The actual constraint is stored in the + /// variable currentRotationConstraint. + /// + private AxisConstraint rotationConstraint; + + /// + /// Vector storing last handlebar Rotation. The handlebar is the line imagined between the controllers/hands. + /// + private Vector3 previousHandlebarRotation; /// /// The current rotation constraint might be modified based on disambiguation logic, for example @@ -34,20 +48,12 @@ public class TwoHandRotateLogic private AxisConstraint currentRotationConstraint; /// - /// Public Accessor for AxisConstraint Property used to constrain Rotation to an axis. + /// ProjectHandlebarGivenConstraint internal function to account for axis constraint /// - public AxisConstraint CurrentRotationConstraint - { - get - { - return currentRotationConstraint; - } - set - { - currentRotationConstraint = value; - } - } - + /// Enum value describing the axis to which the rotation is constrained/param> + /// A Vector3 describing the rotation of the line connecting the inputSources + /// Transform of gameObject to be two hand manipulated + /// a Vector3 describing handlebar after constraint is applied private Vector3 ProjectHandlebarGivenConstraint(AxisConstraint constraint, Vector3 handlebarRotation, Transform manipulationRoot) { Vector3 result = handlebarRotation; @@ -66,6 +72,12 @@ private Vector3 ProjectHandlebarGivenConstraint(AxisConstraint constraint, Vecto return CameraCache.Main.transform.TransformDirection(result); } + /// + /// GetHandlebarDirection internal function to get rotation described by inputSources. + /// + /// Dictionary listing inputSourceStates + /// Transform of gameObject to be two hand manipulated + /// A Vector3 describing the direction of the line connecting the inputSources private Vector3 GetHandlebarDirection(Dictionary handsPressedMap, Transform manipulationRoot) { Assert.IsTrue(handsPressedMap.Count > 1); @@ -84,12 +96,12 @@ private Vector3 GetHandlebarDirection(Dictionary handsPressedMap, } /// - /// Sets Axis Constraint for Rotation operation. + /// TwoHandRotateLogic Constructor /// - /// - public TwoHandRotateLogic(AxisConstraint rotationConstraint) + /// Enum describing to which axis the rotation is constrained + public TwoHandRotateLogic(AxisConstraint constrainRotation) { - m_rotationConstraint = rotationConstraint; + rotationConstraint = constrainRotation; } /// @@ -97,30 +109,29 @@ public TwoHandRotateLogic(AxisConstraint rotationConstraint) /// the Dictionary collection already filled with controller/hand info, /// and the Transform of the GameObject to be manipulated. /// - /// - /// + /// Dictionary listing inputSourceStates + /// Transform of gameObject to be two hand manipulated public void Setup(Dictionary handsPressedMap, Transform manipulationRoot) { - currentRotationConstraint = m_rotationConstraint; - m_previousHandlebarRotation = GetHandlebarDirection(handsPressedMap, manipulationRoot); + currentRotationConstraint = rotationConstraint; + previousHandlebarRotation = GetHandlebarDirection(handsPressedMap, manipulationRoot); } - /// /// Updates internal states based on current Controller/hand states. /// - /// - /// - /// - /// + /// Dictionary listing inputSourceStates + /// Transform of gameObject to be two hand manipulated + /// New rotation to be applied + /// Quaternion describing rotation based on position of inputSources - Controllers/Hands public Quaternion Update(Dictionary handsPressedMap, Transform manipulationRoot, Quaternion currentRotation) { var handlebarDirection = GetHandlebarDirection(handsPressedMap, manipulationRoot); var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, handlebarDirection, manipulationRoot); var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, - m_previousHandlebarRotation, manipulationRoot); - m_previousHandlebarRotation = handlebarDirection; + previousHandlebarRotation, manipulationRoot); + previousHandlebarRotation = handlebarDirection; var rotationDelta = Quaternion.FromToRotation(prevHandlebarDirectionProjected, handlebarDirectionProjected); diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index 9e9c99eb26d..90a1c50b952 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -23,8 +23,8 @@ public class TwoHandScaleLogic /// /// Initialize system with source info from controllers/hands /// - /// - /// + /// Dictionary that maps inputSources to states + /// Transform of gameObject to be manipulated public virtual void Setup(Dictionary handsPressedMap, Transform manipulationRoot) { m_startHandDistanceMeters = GetMinDistanceBetweenHands(handsPressedMap); @@ -34,7 +34,7 @@ public virtual void Setup(Dictionary handsPressedMap, Transform m /// /// Finds the minimum distance between all pairs of hands /// - /// + /// a float describing the distance between Controllers or Hands private float GetMinDistanceBetweenHands(Dictionary handsPressedMap) { var result = float.MaxValue; @@ -58,7 +58,7 @@ private float GetMinDistanceBetweenHands(Dictionary handsPressedM /// update Gameobject with new Scale state /// /// - /// + /// a Vector3 describing the new Scale of the object being manipulated public virtual Vector3 Update(Dictionary handsPressedMap) { var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; diff --git a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs index 6fbceba39a5..14a4b0e020a 100644 --- a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs +++ b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs @@ -30,41 +30,83 @@ public enum FlattenModeEnum FlattenAuto, // Flatten the smallest relative axis if it falls below threshold } + /// + /// The target object. GameObject that the BoundingBox surrounds. + /// [Header("Objects")] [Tooltip("The target object")] [SerializeField] protected GameObject target; + /// + /// "The transform used to scale the bounding box (will be auto-generated) + /// [Tooltip("The transform used to scale the bounding box (will be auto-generated)")] [SerializeField] protected Transform scaleTransform = null; + /// + /// Flattening behavior setting. Which axis will be considered flat? + /// [Header("Flattening & Padding")] [Tooltip("Flattening behavior setting.")] [SerializeField] protected FlattenModeEnum flattenPreference = FlattenModeEnum.FlattenAuto; + /// + /// Public property describing axis intended to be regarded as flat. + /// + public virtual FlattenModeEnum FlattenPreference + { + get + { + return flattenPreference; + } + set + { + flattenPreference = value; + } + } + + /// + /// The relative % size of an axis must meet before being auto-flattened. + /// [Tooltip("The relative % size of an axis must meet before being auto-flattened")] [SerializeField] protected float flattenAxisThreshold = 0.025f; + /// + /// The relative % size of a flattened axis + /// [Tooltip("The relative % size of a flattened axis")] [SerializeField] protected float flattenedAxisThickness = 0.01f; + /// + /// How much to pad the scale of the box to fit around objects (as % of largest dimension) + /// [Tooltip("How much to pad the scale of the box to fit around objects (as % of largest dimension)")] [SerializeField] protected float scalePadding = 0.05f; + /// + /// How much to pad the scale of the box on an axis that's flattened + /// [Tooltip("How much to pad the scale of the box on an axis that's flattened")] [SerializeField] protected float flattenedScalePadding = 0f; + /// + /// Method used to calculate the bounds of the object. + /// [Header("Bounds Calculation")] [Tooltip("Method used to calculate the bounds of the object.")] [SerializeField] protected BoundsCalculationMethodEnum boundsCalculationMethod = BoundsCalculationMethodEnum.MeshFilterBounds; + /// + /// Any renderers on this layer will be ignored when calculating object bounds + /// [Tooltip("Any renderers on this layer will be ignored when calculating object bounds")] [SerializeField] protected LayerMask ignoreLayers = (1 << 2); // Ignore Raycast Layer @@ -83,14 +125,15 @@ public enum FlattenModeEnum protected Renderer rendererForVisibility; + /// + /// Event Handler- called when the FlattenedAxis property is changed. + /// public Action OnFlattenedAxisChange; - public virtual FlattenModeEnum FlattenPreference - { - get { return flattenPreference; } - set { flattenPreference = value; } - } - + /// + /// instruction to boundingBox which determines which of several methods + /// to use to calculate the bounds of the gameObject it surrounds. + /// public virtual BoundsCalculationMethodEnum BoundsCalculationMethod { get { return boundsCalculationMethod; } @@ -236,6 +279,9 @@ protected virtual void OnDrawGizmos() } #endif + /// + /// private Update function provided by MonoBehaviour + /// protected virtual void Update() { CreateTransforms(); @@ -243,11 +289,17 @@ protected virtual void Update() UpdateScaleTransform(); } + /// + /// Method which instantiates new Transforms + /// if they have not been declared earlier. + /// The variable scaleTransform represents the transform + /// belonging + /// protected virtual void CreateTransforms() { if (scaleTransform == null) { - scaleTransform = transform.Find("Scale"); + scaleTransform = transform; } if (scaleTransform == null) @@ -258,6 +310,11 @@ protected virtual void CreateTransforms() scaleTransform.parent = transform; } + /// + /// re-calculates the Bounding box extrema (corners) + /// of the axis aligned cube that bounds the Target gameObject. + /// This method takes into account flattening. + /// protected virtual void RefreshTargetBounds() { if (target == null) @@ -315,9 +372,11 @@ protected virtual void RefreshTargetBounds() UpdateFlattenedAxis(); } + /// + /// recomputes flattening if axis to be flattened has changed. + /// protected virtual void UpdateFlattenedAxis() { - // Find the maximum size of the new bounds float maxAxisThickness = Mathf.Max(Mathf.Max(targetBoundsLocalScale.x, targetBoundsLocalScale.y), targetBoundsLocalScale.z); @@ -421,7 +480,12 @@ protected virtual void UpdateScaleTransform() #endregion #region static utility functions - + /// + /// Method to get bounding box points using Collider method. + /// + /// gameObject that boundingBox bounds. + /// array reference that gets filled with points + /// layerMask to simplify search public static void GetColliderBoundsPoints(GameObject target, List boundsPoints, LayerMask ignoreLayers) { Collider[] colliders = target.GetComponentsInChildren(); @@ -482,6 +546,12 @@ public static void GetColliderBoundsPoints(GameObject target, List boun } } + /// + /// GetRenderBoundsPoints gets bounding box points using RenderBounds + /// + /// gameObject that boundingbox bounds + /// array reference that gets filled with points + /// layerMask to simplify search public static void GetRenderBoundsPoints(GameObject target, List boundsPoints, LayerMask ignoreLayers) { Renderer[] renderers = target.GetComponentsInChildren(); @@ -498,6 +568,12 @@ public static void GetRenderBoundsPoints(GameObject target, List bounds } } + /// + /// GetMeshFilterBoundsPoints - gets boundingbox points using MeshFilter method. + /// + /// gameObject that boundingbox bounds + /// array reference that gets filled with points + /// layerMask to simplify search public static void GetMeshFilterBoundsPoints(GameObject target, List boundsPoints, LayerMask ignoreLayers) { MeshFilter[] meshFilters = target.GetComponentsInChildren(); @@ -523,8 +599,6 @@ public static void GetMeshFilterBoundsPoints(GameObject target, List bo private static Vector3[] corners = null; private static Vector3[] rectTransformCorners = new Vector3[4]; - #endregion - } } \ No newline at end of file From 053b0881ae458d018402b036d2ca00a149feb760 Mon Sep 17 00:00:00 2001 From: Dong Yoon Park Date: Mon, 2 Apr 2018 10:58:26 -0700 Subject: [PATCH 09/13] Removed a redundant line. --- .../Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index 90a1c50b952..f96129b2a1c 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -64,6 +64,5 @@ public virtual Vector3 Update(Dictionary handsPressedMap) var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; return m_startObjectScale * ratioMultiplier; } - } } From 5385f8c8c47c2c677a913fc6c6af21ffa0cc87f2 Mon Sep 17 00:00:00 2001 From: johnppella Date: Mon, 2 Apr 2018 14:27:05 -0700 Subject: [PATCH 10/13] more PR changes --- .../Interactions/TwoHandManipulatable.cs | 52 ++++++------------- .../Interactions/TwoHandMoveLogic.cs | 3 +- .../Interactions/TwoHandRotateLogic.cs | 7 +-- .../Interactions/TwoHandScaleLogic.cs | 2 +- .../UX/Scripts/BoundingBoxes/BoundingBox.cs | 8 ++- 5 files changed, 27 insertions(+), 45 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index 15732bc1a17..ede4b851969 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -21,16 +21,6 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interations /// public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHandler { - /// - /// Event that gets raised when user begins manipulating the object - /// - public event Action StartedManipulating; - - /// - /// Event that gets raised when the user ends manipulation - /// - public event Action StoppedManipulating; - [SerializeField] [Tooltip("Transform that will be dragged. Defaults to the object of the component.")] private Transform HostTransform = null; @@ -39,6 +29,18 @@ public class TwoHandManipulatable : MonoBehaviour, IInputHandler, ISourceStateHa [Tooltip("To visualize the object bounding box, drop the HoloToolKit/UX/Prefabs/BoundingBoxes/BoundingBoxBasic.prefab here. This is optional.")] private BoundingBox boundingBoxPrefab = null; + /// + /// enum describing range of affine xforms that are allowed. + /// + private enum TwoHandedManipulation + { + Scale, + Rotate, + MoveScale, + RotateScale, + MoveRotateScale + }; + /// /// Reference to the Prefab from which clone is instantiated. /// @@ -55,18 +57,6 @@ public BoundingBox BoundingBoxPrefab } } - /// - /// - /// - public enum TwoHandedManipulation - { - Scale, - Rotate, - MoveScale, - RotateScale, - MoveRotateScale - }; - [SerializeField] [Tooltip("What manipulation will two hands perform?")] private TwoHandedManipulation ManipulationMode = TwoHandedManipulation.Scale; @@ -142,7 +132,7 @@ private bool ShowBoundingBox /// /// SetManipulationMode /// - public void SetManipulationMode(TwoHandedManipulation mode) + private void SetManipulationMode(TwoHandedManipulation mode) { ManipulationMode = mode; } @@ -186,7 +176,7 @@ private void Update() private Vector3 GetInputPosition(InputEventData eventData) { - Vector3 result = Vector3.zero; + Vector3 result; eventData.InputSource.TryGetGripPosition(eventData.SourceId, out result); return result; } @@ -229,9 +219,7 @@ public void OnInputUp(InputEventData eventData) /// /// OnSourceDetected Event Handler /// - public void OnSourceDetected(SourceStateEventData eventData) - { - } + public void OnSourceDetected(SourceStateEventData eventData){} /// /// OnSourceLost @@ -379,7 +367,7 @@ private void OnTwoHandManipulationUpdated() } if ((currentState & State.Scaling) > 0) { - targetScale = m_scaleLogic.Update(m_handsPressedLocationsMap); + targetScale = m_scaleLogic.UpdateMap(m_handsPressedLocationsMap); } HostTransform.position = targetPosition; @@ -429,10 +417,6 @@ private void OnOneHandMoveStarted() private void OnManipulationStarted() { - if (StartedManipulating != null) - { - StartedManipulating(); - } InputManager.Instance.PushModalInputHandler(gameObject); //Show Bounding Box visual on manipulation interaction @@ -441,10 +425,6 @@ private void OnManipulationStarted() private void OnManipulationEnded() { - if (StoppedManipulating != null) - { - StoppedManipulating(); - } InputManager.Instance.PopModalInputHandler(); //Hide Bounding Box visual on release diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs index 45bbc246a33..bb88f910884 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -22,6 +22,7 @@ public class TwoHandMoveLogic private float handRefDistance; private float objRefDistance; private const float DistanceScale = 2f; + private static readonly Vector3 initialMove = new Vector3(0, -0.2f, 0); /// /// The initial angle between the hand and the object @@ -105,7 +106,7 @@ public Vector3 Update(Vector3 centroid, Vector3 manipulationObjectPosition) /// public static Vector3 GetHandPivotPosition() { - Vector3 pivot = CameraCache.Main.transform.position + new Vector3(0, -0.2f, 0) - CameraCache.Main.transform.forward * 0.2f; // a bit lower and behind + Vector3 pivot = CameraCache.Main.transform.position + initialMove - CameraCache.Main.transform.forward * 0.2f; // a bit lower and behind return pivot; } } diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs index a63eee8a375..23079c98ef3 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs @@ -80,7 +80,6 @@ private Vector3 ProjectHandlebarGivenConstraint(AxisConstraint constraint, Vecto /// A Vector3 describing the direction of the line connecting the inputSources private Vector3 GetHandlebarDirection(Dictionary handsPressedMap, Transform manipulationRoot) { - Assert.IsTrue(handsPressedMap.Count > 1); var handsEnumerator = handsPressedMap.Values.GetEnumerator(); handsEnumerator.MoveNext(); var hand1 = handsEnumerator.Current; @@ -127,10 +126,8 @@ public void Setup(Dictionary handsPressedMap, Transform manipulat public Quaternion Update(Dictionary handsPressedMap, Transform manipulationRoot, Quaternion currentRotation) { var handlebarDirection = GetHandlebarDirection(handsPressedMap, manipulationRoot); - var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, handlebarDirection, - manipulationRoot); - var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, - previousHandlebarRotation, manipulationRoot); + var handlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, handlebarDirection, manipulationRoot); + var prevHandlebarDirectionProjected = ProjectHandlebarGivenConstraint(currentRotationConstraint, previousHandlebarRotation, manipulationRoot); previousHandlebarRotation = handlebarDirection; var rotationDelta = Quaternion.FromToRotation(prevHandlebarDirectionProjected, handlebarDirectionProjected); diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index f96129b2a1c..f40c52a58a1 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -59,7 +59,7 @@ private float GetMinDistanceBetweenHands(Dictionary handsPressedM /// /// /// a Vector3 describing the new Scale of the object being manipulated - public virtual Vector3 Update(Dictionary handsPressedMap) + public virtual Vector3 UpdateMap(Dictionary handsPressedMap) { var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; return m_startObjectScale * ratioMultiplier; diff --git a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs index 14a4b0e020a..5e0f5af3eff 100644 --- a/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs +++ b/Assets/HoloToolkit/UX/Scripts/BoundingBoxes/BoundingBox.cs @@ -292,8 +292,12 @@ protected virtual void Update() /// /// Method which instantiates new Transforms /// if they have not been declared earlier. - /// The variable scaleTransform represents the transform - /// belonging + /// Method assigns the variable scaleTransform + /// which represents the transform + /// to which the boundingbox aligns itself. It can be assigned + /// directly if 'this' already has a Transform. If not + /// it gets set by instantiating a new Transform. + /// Once it is set- the new transform becomes the parent of scaleTransform. /// protected virtual void CreateTransforms() { From f84bde8ca529cf227dd76c2fa3de0f492faa7e45 Mon Sep 17 00:00:00 2001 From: johnppella Date: Mon, 2 Apr 2018 14:43:31 -0700 Subject: [PATCH 11/13] removed block --- .../Interactions/TwoHandScaleLogic.cs | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index f40c52a58a1..b71034b728e 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -32,9 +32,16 @@ public virtual void Setup(Dictionary handsPressedMap, Transform m } /// - /// Finds the minimum distance between all pairs of hands + /// update Gameobject with new Scale state /// - /// a float describing the distance between Controllers or Hands + /// + /// a Vector3 describing the new Scale of the object being manipulated + public virtual Vector3 UpdateMap(Dictionary handsPressedMap) + { + var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; + return m_startObjectScale * ratioMultiplier; + } + private float GetMinDistanceBetweenHands(Dictionary handsPressedMap) { var result = float.MaxValue; @@ -53,16 +60,5 @@ private float GetMinDistanceBetweenHands(Dictionary handsPressedM } return result; } - - /// - /// update Gameobject with new Scale state - /// - /// - /// a Vector3 describing the new Scale of the object being manipulated - public virtual Vector3 UpdateMap(Dictionary handsPressedMap) - { - var ratioMultiplier = GetMinDistanceBetweenHands(handsPressedMap) / m_startHandDistanceMeters; - return m_startObjectScale * ratioMultiplier; - } } } From 54761e2a8f48c2c35c57399c253e5481cc66c1dc Mon Sep 17 00:00:00 2001 From: Dong Yoon Park Date: Tue, 3 Apr 2018 11:26:53 -0700 Subject: [PATCH 12/13] Updated typo in the namespaces --- .../Scripts/Utilities/Interactions/AffineConstraintEnums.cs | 2 +- .../Scripts/Utilities/Interactions/TwoHandManipulatable.cs | 2 +- .../Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs | 2 +- .../Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs | 2 +- .../Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs index 2f8bcc4ba94..2cd3cce47bb 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/AffineConstraintEnums.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -namespace HoloToolkit.Unity.InputModule.Utilities.Interations +namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// /// Enum for Axis Constraints diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs index ede4b851969..124728b32fe 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandManipulatable.cs @@ -10,7 +10,7 @@ using UnityEngine.Assertions; -namespace HoloToolkit.Unity.InputModule.Utilities.Interations +namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// /// This script allows for an object to be movable, scalable, and rotatable with one or two hands. diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs index bb88f910884..ed296025011 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -3,7 +3,7 @@ using UnityEngine; -namespace HoloToolkit.Unity.InputModule.Utilities.Interations +namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// /// Implements a movement logic that uses the model of angular rotations along a sphere whose diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs index 23079c98ef3..7206892bccf 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandRotateLogic.cs @@ -5,7 +5,7 @@ using UnityEngine; using UnityEngine.Assertions; -namespace HoloToolkit.Unity.InputModule.Utilities.Interations +namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// /// Implements common logic for rotating holograms using a handlebar metaphor. diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs index b71034b728e..8cbd1471013 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandScaleLogic.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using UnityEngine; -namespace HoloToolkit.Unity.InputModule.Utilities.Interations +namespace HoloToolkit.Unity.InputModule.Utilities.Interactions { /// /// Implements a scale logic that will scale an object based on the From b94cac257376f8d8e4cddd410793deee64eb888a Mon Sep 17 00:00:00 2001 From: Dong Yoon Park Date: Tue, 3 Apr 2018 11:30:10 -0700 Subject: [PATCH 13/13] Updated to #region --- .../Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs index ed296025011..f91fffe57ef 100644 --- a/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs +++ b/Assets/HoloToolkit/Input/Scripts/Utilities/Interactions/TwoHandMoveLogic.cs @@ -16,13 +16,12 @@ namespace HoloToolkit.Unity.InputModule.Utilities.Interactions /// public class TwoHandMoveLogic { - /// - /// private variables - /// + #region private members private float handRefDistance; private float objRefDistance; private const float DistanceScale = 2f; private static readonly Vector3 initialMove = new Vector3(0, -0.2f, 0); + #endregion /// /// The initial angle between the hand and the object