Skip to content

Commit 645257b

Browse files
committed
Migrate changes from #6961
1 parent 2d13823 commit 645257b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Documentation/README_BoundingBox.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
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.
66

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.
7+
For more information, see [Bounding box and App bar](https://docs.microsoft.com/windows/mixed-reality/app-bar-and-bounding-box) in the Windows Dev Center.
88

99
## Example scene
1010

@@ -16,8 +16,8 @@ You can find examples of bounding box configurations in the `BoundingBoxExamples
1616

1717
1. Add Box Collider to an object
1818
2. Assign `BoundingBox` script to an object
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)
19+
3. Configure options, such as 'Activation' methods (see [Inspector properties](#inspector-properties) section below)
20+
4. (Optional) Assign prefabs and materials for a HoloLens 2 style bounding box (see [Handle styles](#handle-styles) section below)
2121

2222
> [!NOTE]
2323
> 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
5050
bbox.ShowRotationHandleForZ = false;
5151
```
5252

53-
1. (Optional) Assign prefabs and materials for HoloLens 2 style bounding box. This still requires assignments through the inspector since the materials and prefabs should be dynamically loaded.
53+
1. (Optional) Assign prefabs and materials for a HoloLens 2 style bounding box. This still requires assignments through the inspector since the materials and prefabs should be dynamically loaded.
5454

5555
> [!NOTE]
5656
> 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.
@@ -85,7 +85,7 @@ scaleConstraint.ScaleMaximum = 2f;
8585

8686
## Example: Add bounding box around a game object
8787

88-
To add a bounding box around an object, simply add a bounding box component to it:
88+
To add a bounding box around an object, simply add a `BoundingBox` component to it:
8989

9090
```c#
9191
private void PutABoxAroundIt(GameObject target)
@@ -115,11 +115,11 @@ There are several options to activate the bounding box interface.
115115

116116
### Scale minimum
117117

118-
The minimum allowed scale. This property is deprecated and it is preferable to add a [`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.
118+
The minimum allowed scale. This property is deprecated and it is preferable to add a [`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 the bounding box.
119119
120120
### Scale maximum
121121

122-
The maximum allowed scale. This property is deprecated and it is preferable to add a [`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.
122+
The maximum allowed scale. This property is deprecated and it is preferable to add a [`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 the bounding box.
123123
124124
### Box display
125125

@@ -133,7 +133,7 @@ You can assign the material and prefab to override the handle style. If no handl
133133

134134
## Events
135135

136-
Bounding box provides the following events. The example uses these events to play audio feedback.
136+
Bounding box provides the following events. This example uses these events to play audio feedback.
137137

138138
* **Rotate Started**: Fired when rotation starts.
139139
* **Rotate Ended**: Fired when rotation ends.
@@ -173,9 +173,9 @@ Show and hide the handles with animation based on the distance to the hands. It
173173
* **Proximity Effect Active**: Enable proximity-based handle activation
174174
* **Handle Medium Proximity**: Distance for the 1st step scaling
175175
* **Handle Close Proximity**: Distance for the 2nd step scaling
176-
* **Far Scale**: Default scale value of the handle asset when the hands are out of the range of bounding box interaction(distance defined above by 'Handle Medium Proximity'. Use 0 to hide handle by default)
177-
* **Medium Scale**: Scale value of the handle asset when the hands are within the range of the bounding box interaction(distance defined above by 'Handle Close Proximity'. Use 1 to show normal size)
178-
* **Close Scale**: Scale value of the handle asset when the hands are within the grab interaction(distance defined above by 'Handle Close Proximity'. Use 1.x to show bigger size)
176+
* **Far Scale**: Default scale value of the handle asset when the hands are out of range of the bounding box interaction (distance defined above by 'Handle Medium Proximity'. Use 0 to hide handle by default)
177+
* **Medium Scale**: Scale value of the handle asset when the hands are within range of the bounding box interaction (distance defined above by 'Handle Close Proximity'. Use 1 to show normal size)
178+
* **Close Scale**: Scale value of the handle asset when the hands are within range of the grab interaction (distance defined above by 'Handle Close Proximity'. Use 1.x to show bigger size)
179179

180180
## Making an object movable with manipulation handler
181181

0 commit comments

Comments
 (0)