You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [`BoundingBox.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs) script provides basic functionality for transforming objects in mixed reality. A bounding box will show a cube around the hologram to indicate that it can be interacted with. Handles on the corners and edges of the cube allow scaling or rotating the object. The bounding box also reacts to user input. On HoloLens 2 for example the bounding box responds to finger proximity, providing visual feedback to help perceive the distance from the object. All interactions and visuals can be easily customized.
5
+
The [`BoundingBox.cs`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/BoundingBox/BoundingBox.cs) script provides basic functionality for transforming objects in mixed reality. A bounding box will show a cube around the hologram to indicate that it can be interacted with. Handles on the corners and edges of the cube allow scaling or rotating the object. The bounding box also reacts to user input. On HoloLens 2, for example, the bounding box responds to finger proximity, providing visual feedback to help perceive the distance from the object. All interactions and visuals can be easily customized.
6
6
7
7
For more information please see [Bounding Box and App Bar](https://docs.microsoft.com/windows/mixed-reality/app-bar-and-bounding-box) on Windows Dev Center.
8
8
9
9
## Example scene
10
10
11
-
You can find examples of Bounding Box configurations in the `BoundingBoxExamples` scene.
11
+
You can find examples of bounding box configurations in the `BoundingBoxExamples` scene.
@@ -17,7 +17,7 @@ You can find examples of Bounding Box configurations in the `BoundingBoxExamples
17
17
1. Add Box Collider to an object
18
18
2. Assign `BoundingBox` script to an object
19
19
3. Configure options such as 'Activation' methods (see [Inspector properties](#inspector-properties) section below)
20
-
4. (Optional) Assign prefabs and materials for HoloLens 2 style Bounding Box (see [Handle styles](#handle-styles) section below)
20
+
4. (Optional) Assign prefabs and materials for HoloLens 2 style bounding box (see [Handle styles](#handle-styles) section below)
21
21
22
22
> [!NOTE]
23
23
> Use *Target Object* and *Bounds Override* field in the inspector to assign specific object and collider in the object with multiple child components.
@@ -50,7 +50,7 @@ You can find examples of Bounding Box configurations in the `BoundingBoxExamples
50
50
bbox.ShowRotationHandleForZ=false;
51
51
```
52
52
53
-
1. (Optional) Assignprefabsandmaterialsfor HoloLens 2 style Bounding Box. This still requires assignments through the inspector since the materials and prefabs should be dynamically loaded.
53
+
1. (Optional) Assignprefabsandmaterialsfor HoloLens 2 style bounding box. This still requires assignments through the inspector since the materials and prefabs should be dynamically loaded.
54
54
55
55
> [!NOTE]
56
56
> Using Unity's 'Resources' folder or [Shader.Find]( https://docs.unity3d.com/ScriptReference/Shader.Find.html) for dynamically loading shaders is not recommended since shader permutations may be missing at runtime.
Theminimumallowedscale. Thispropertyisdeprecatedanditispreferabletoadda [`MinMaxScaleConstraint`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/MinMaxScaleConstraint.cs) script. If this script is added, the minimum scale will be taken from it instead of from BoundingBox.
118
+
Theminimumallowedscale. Thispropertyisdeprecatedanditispreferabletoadda [`MinMaxScaleConstraint`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/MinMaxScaleConstraint.cs) script. If this script is added, the minimum scale will be taken from it instead of from bounding box.
119
119
120
120
### Scale maximum
121
121
122
-
Themaximumallowedscale. Thispropertyisdeprecatedanditispreferabletoadda [`MinMaxScaleConstraint`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/MinMaxScaleConstraint.cs) script. If this script is added, the maximum scale will be taken from it instead of from BoundingBox.
122
+
Themaximumallowedscale. Thispropertyisdeprecatedanditispreferabletoadda [`MinMaxScaleConstraint`](https://github.com/Microsoft/MixedRealityToolkit-Unity/blob/mrtk_release/Assets/MixedRealityToolkit.SDK/Features/Input/Handlers/MinMaxScaleConstraint.cs) script. If this script is added, the maximum scale will be taken from it instead of from bounding box.
123
123
124
124
### Box display
125
125
@@ -148,7 +148,7 @@ By default, when you just assign the [`BoundingBox.cs`](https://github.com/Micro
***FarScale**:DefaultscalevalueofthehandleassetwhenthehandsareoutoftherangeofBoundingBoxinteraction(distancedefinedaboveby'Handle Medium Proximity'. Use0tohidehandlebydefault)
177
-
***MediumScale**:ScalevalueofthehandleassetwhenthehandsarewithintherangeoftheBoundingBoxinteraction(distancedefinedaboveby'Handle Close Proximity'. Use1toshownormalsize)
176
+
***FarScale**:Defaultscalevalueofthehandleassetwhenthehandsareoutoftherangeofboundingboxinteraction(distancedefinedaboveby'Handle Medium Proximity'. Use0tohidehandlebydefault)
177
+
***MediumScale**:Scalevalueofthehandleassetwhenthehandsarewithintherangeoftheboundingboxinteraction(distancedefinedaboveby'Handle Close Proximity'. Use1toshownormalsize)
178
178
***CloseScale**:Scalevalueofthehandleassetwhenthehandsarewithinthegrabinteraction(distancedefinedaboveby'Handle Close Proximity'. Use1.xtoshowbiggersize)
179
179
180
180
## Making an object movable with manipulation handler
0 commit comments