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
## [2.0.4] - 2022-10-19
### Changed
- Ray casts now query the local [PhysicsScene](https://docs.unity3d.com/ScriptReference/PhysicsScene.html) instead of using static Physics routines which uses the default physics scene. Gesture classes that perform ray casts use the camera's scene, and components that perform ray casts use its scene during `Awake`.
- Creating a new `XR Origin (VR)` now automatically adds an `Input Action Manager` component and sets the `Action Assets` to `XRI Default Input Action.inputactions` asset if available from the `Starter Assets` sample package.
### Fixed
- Fixed XR Interactor Line Visual so it deactivates the current reticle GameObject when the behavior is enabled or disabled.
- Fixed `XRUIInputModule` to use the correct button type for middle and right mouse buttons when sending mouse button events.
- Fixed issue where the last point in the curve rendered by XR Interactor Line Visual would not always be continuous with the rest of the curve (for example when sphere cast is used).
- Fixed issue where `XRInteractorReticleVisual` script did not properly detect ray casts with UI objects. ([XRIT-18](https://issuetracker.unity3d.com/product/unity/issues/guid/XRIT-18))
- Fixed an issue with throwing physics on Quest devices where bad frame-timing would cause unexpectedly high velocities to be applied.
- Fixed issue where using the [MockHMD XR Plugin package](https://docs.unity3d.com/Packages/com.unity.xr.mock-hmd@latest/) with the `XRDeviceSimulator` would cause the device simulator's rotation to be overwritten. This issue can also be fixed by upgrading the [Input System package](https://docs.unity3d.com/Manual/com.unity.inputsystem.html) to 1.4.1+.
- Fixed Tracked Device Graphic Raycaster to use the correct ray cast method when Check for 2D Occlusion is enabled, and changed it to use the local [PhysicsScene2D](https://docs.unity3d.com/ScriptReference/PhysicsScene2D.html).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
7
7
<!-- Headers should be listed in this order: Added, Changed, Deprecated, Removed, Fixed, Security -->
8
+
## [2.0.4] - 2022-10-19
9
+
10
+
### Changed
11
+
- Ray casts now query the local [PhysicsScene](https://docs.unity3d.com/ScriptReference/PhysicsScene.html) instead of using static Physics routines which uses the default physics scene. Gesture classes that perform ray casts use the camera's scene, and components that perform ray casts use its scene during `Awake`.
12
+
- Creating a new `XR Origin (VR)` now automatically adds an `Input Action Manager` component and sets the `Action Assets` to `XRI Default Input Action.inputactions` asset if available from the `Starter Assets` sample package.
13
+
14
+
### Fixed
15
+
- Fixed XR Interactor Line Visual so it deactivates the current reticle GameObject when the behavior is enabled or disabled.
16
+
- Fixed `XRUIInputModule` to use the correct button type for middle and right mouse buttons when sending mouse button events.
17
+
- Fixed issue where the last point in the curve rendered by XR Interactor Line Visual would not always be continuous with the rest of the curve (for example when sphere cast is used).
18
+
- Fixed issue where `XRInteractorReticleVisual` script did not properly detect ray casts with UI objects. ([XRIT-18](https://issuetracker.unity3d.com/product/unity/issues/guid/XRIT-18))
19
+
- Fixed an issue with throwing physics on Quest devices where bad frame-timing would cause unexpectedly high velocities to be applied.
20
+
- Fixed issue where using the [MockHMD XR Plugin package](https://docs.unity3d.com/Packages/com.unity.xr.mock-hmd@latest/) with the `XRDeviceSimulator` would cause the device simulator's rotation to be overwritten. This issue can also be fixed by upgrading the [Input System package](https://docs.unity3d.com/Manual/com.unity.inputsystem.html) to 1.4.1+.
21
+
- Fixed Tracked Device Graphic Raycaster to use the correct ray cast method when Check for 2D Occlusion is enabled, and changed it to use the local [PhysicsScene2D](https://docs.unity3d.com/ScriptReference/PhysicsScene2D.html).
Copy file name to clipboardExpand all lines: Documentation~/general-setup.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ These steps will guide you through setup to use the action-based behaviors, whic
6
6
7
7
## Action-based vs Device-based behaviors
8
8
9
-
Several behaviors, such as the [Snap Turn Provider](locomotion.md#snap-turn-provider), have two variants: an Action-based behavior and a Device-based behavior. Action-based behaviors use [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Actions.html) to indirectly read input from one or more controls. Device-based behaviors use [`InputDevice.TryGetFeatureValue`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.TryGetFeatureValue.html) to read input directly from an [`InputDevice`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.html) from a specific control configured on the behavior itself.
9
+
Several behaviors, such as the [Snap Turn Provider](locomotion.md#snap-turn-provider), have two variants: an Action-based behavior and a Device-based behavior. Action-based behaviors use [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Actions.html) to indirectly read input from one or more controls. Device-based behaviors use [`InputDevice.TryGetFeatureValue`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.TryGetFeatureValue.html) to read input directly from an [`InputDevice`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.html) from a specific control configured on the behavior itself.
10
10
11
11
It is recommended that you use the Action-based variant instead of the Device-based variant to take advantage of the benefits that the Input System package provides. For example, it separates the logical inputs from the physical inputs, and users can create and switch between customized action maps, bind multiple cross-platform controller inputs to a single semantic action, and use event callbacks of input actions. Some features of the XR Interaction Toolkit package, such as the XR Device Simulator, are only supported when using input actions.
12
12
@@ -62,18 +62,20 @@ The **Enable Interaction with UI GameObjects** option controls whether this XR R
62
62
63
63
## Enable actions for action-based behaviors
64
64
65
-
Actions must be enabled before they react to input. See [Using Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Actions.html#using-actions) in the Input System documentation for details about this process. Action-based behaviors in this package have properties of type [`InputActionProperty`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/api/UnityEngine.InputSystem.InputActionProperty.html) which can either store an Action directly, or indirectly by referencing an Action contained in an Input Action Asset. Action-based behaviors automatically enable and disable the Actions that are directly defined (that is, not a reference) during their own `OnEnable` and `OnDisable` events. Action-based behaviors don't automatically enable or disable the Actions that are indirectly defined (that is, a reference) to allow the enabled state to be managed externally.
65
+
Actions must be enabled before they react to input. See [Using Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Actions.html#using-actions) in the Input System documentation for details about this process. Action-based behaviors in this package have properties of type [`InputActionProperty`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/api/UnityEngine.InputSystem.InputActionProperty.html) which can either store an Action directly, or indirectly by referencing an Action contained in an Input Action Asset. Action-based behaviors automatically enable and disable the Actions that are directly defined (that is, not a reference) during their own `OnEnable` and `OnDisable` events. Action-based behaviors don't automatically enable or disable the Actions that are indirectly defined (that is, a reference) to allow the enabled state to be managed externally.
66
66
67
67
The Input Action Manager component can be used to automatically enable or disable the Actions defined in an Input Action Asset during its own `OnEnable` and `OnDisable` events.
68
68
69
-
Use **GameObject > Create Empty** and rename the GameObject Input Action Manager. Use **Component > Input > Input Action Manager** to add the component to the GameObject you created. Select **Add (+)** or set **Size** to **1** in the Inspector window to add an element to the **Action Assets** list. Select the element's object picker (circle icon) and choose **XRI Default Input Actions**.
69
+
If you created the XR Origin using **GameObject > XR > XR Origin (VR)**, you will already have an Input Action Manager attached to the **XR Origin**, if not, use **GameObject > Create Empty** and rename the GameObject Input Action Manager. Use **Component > Input > Input Action Manager** to add the component to the GameObject you created.
70
+
71
+
If you have imported the **Starter Assets** sample package, the **XRI Default Input Actions** should already be set in the **Action Assets** configuration for the component. If **Starter Assets** are not available or you are creating this object manually, select **Add (+)** or set **Size** to **1** in the Inspector window to add an element to the **Action Assets** list. Select the element's object picker (circle icon) and choose **XRI Default Input Actions**.
If you later create additional Input Action Assets, add them to the **Action Assets** list to enable all its actions also.
74
76
75
77
> [!NOTE]
76
-
> For Input Actions to read from input devices correctly while running in the Unity Editor, the Game view may need to have focus depending on the current project settings. If you find that your input, such as button presses on the controllers, are not working, ensure the Game view has focus by clicking it with your mouse. See [Background and focus change behavior](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Devices.html#background-and-focus-change-behavior) to learn how to adjust settings to not require focus in the Game view.
78
+
> For Input Actions to read from input devices correctly while running in the Unity Editor, the Game view may need to have focus depending on the current project settings. If you find that your input, such as button presses on the controllers, are not working, ensure the Game view has focus by clicking it with your mouse. See [Background and focus change behavior](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Devices.html#background-and-focus-change-behavior) to learn how to adjust settings to not require focus in the Game view.
Copy file name to clipboardExpand all lines: Documentation~/installation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ To install this package, follow the instructions for [adding a package by name](
19
19
|Text Field|Value|
20
20
|---|---|
21
21
|**Name**|`com.unity.xr.interaction.toolkit`|
22
-
|**Version (optional)**|`2.0.3`|
22
+
|**Version (optional)**|`2.0.4`|
23
23
24
24
## Version 2020.3
25
25
@@ -31,7 +31,7 @@ To install this package, follow the [installation instructions in the Unity User
31
31
32
32
## Input System
33
33
34
-
This package has a dependency on [Input System](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/index.html). If that package has not already been installed, Unity will automatically add it to your Project. You might see a prompt asking you to enable input backends. Click **Yes** to accept it. For more information, see [Enabling the new input backends](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Installation.html#enabling-the-new-input-backends) in the Input System package documentation.
34
+
This package has a dependency on [Input System](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/index.html). If that package has not already been installed, Unity will automatically add it to your Project. You might see a prompt asking you to enable input backends. Click **Yes** to accept it. For more information, see [Enabling the new input backends](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Installation.html#enabling-the-new-input-backends) in the Input System package documentation.
Copy file name to clipboardExpand all lines: Documentation~/locomotion.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ This documentation outlines how to use and extend these components.
26
26
|**Snap Turn**| A type of locomotion that rotates the user by a fixed angle. |
27
27
|**Continuous Turn**| A type of locomotion that smoothly rotates the user by an amount over time. |
28
28
|**Continuous Move**| A type of locomotion that smoothly moves the user by an amount over time. |
29
-
|**Action-based**| The recommended type of input based on referencing the [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Actions.html) and their controller bindings in the Input System. |
29
+
|**Action-based**| The recommended type of input based on referencing the [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Actions.html) and their controller bindings in the Input System. |
30
30
|**Device-based**| An alternative type of input based on reading inputs from a [`InputDevice`]([`InputDevice.TryGetFeatureValue`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.TryGetFeatureValue.html)). |
31
31
32
32
## Set up a basic scene for snap turn and teleportation
Copy file name to clipboardExpand all lines: Documentation~/samples.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,22 +11,22 @@ To install samples included with this package, follow the instructions for [Inst
11
11
12
12
This sample is installed into the default location for package samples, in the `Assets\Samples\XR Interaction Toolkit\[version]\Starter Assets` folder. You can move these Assets to a different location.
13
13
14
-
This sample contains an [Input Action Asset](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/ActionAssets.html) that contains [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Actions.html) with typical [Input Bindings](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/ActionBindings.html) for use with behaviors in the XR Interaction Toolkit that read input.
14
+
This sample contains an [Input Action Asset](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/ActionAssets.html) that contains [Actions](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Actions.html) with typical [Input Bindings](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/ActionBindings.html) for use with behaviors in the XR Interaction Toolkit that read input.
15
15
16
16
This sample also contains [Presets](https://docs.unity3d.com/Manual/Presets.html) for behaviors that use actions to streamline their configuration.
17
17
18
18
|**Asset**|**Description**|
19
19
|---|---|
20
20
|**`XRI Default Continuous Move.preset`**|Preset for [Continuous Move Provider](locomotion.md#continuous-move-provider).|
21
21
|**`XRI Default Continuous Turn.preset`**|Preset for [Continuous Turn Provider](locomotion.md#continuous-turn-provider).|
22
-
|**`XRI Default Input Actions.inputactions`**|Asset that contains actions with typical bindings and several [Control Schemes](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/ActionBindings.html#control-schemes) for use in XR experiences.|
22
+
|**`XRI Default Input Actions.inputactions`**|Asset that contains actions with typical bindings and several [Control Schemes](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/ActionBindings.html#control-schemes) for use in XR experiences.|
23
23
|**`XRI Default Left Controller.preset`**|Preset for left hand [Controllers](architecture.md#controllers).|
24
24
|**`XRI Default Right Controller.preset`**|Preset for right hand [Controllers](architecture.md#controllers).|
25
25
|**`XRI Default Snap Turn.preset`**|Preset for [Snap Turn Provider](locomotion.md#snap-turn-provider).|
26
26
27
27
### Input Actions Asset
28
28
29
-
The following image shows the [Action editor](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/ActionAssets.html#editing-input-action-assets) of the Asset included in the sample, while editing one of the bindings of an action in one of the maps.
29
+
The following image shows the [Action editor](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/ActionAssets.html#editing-input-action-assets) of the Asset included in the sample, while editing one of the bindings of an action in one of the maps.
@@ -79,7 +79,7 @@ The XR Interaction Toolkit package provides an example implementation of an XR D
79
79
80
80
### Input Actions Asset
81
81
82
-
The following image shows the [Action editor](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/ActionAssets.html#editing-input-action-assets) of the Asset included in the sample, while editing one of the bindings of an action in one of the maps.
82
+
The following image shows the [Action editor](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/ActionAssets.html#editing-input-action-assets) of the Asset included in the sample, while editing one of the bindings of an action in one of the maps.
Copy file name to clipboardExpand all lines: Documentation~/xr-controller-action-based.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Interprets feature values on a tracked input controller device using actions fro
4
4
5
5
This behavior requires that the Input System is enabled in the **Active Input Handling** setting in **Edit > Project Settings > Player** for input values to be read. Each input action must also be enabled to read the current value of the action. Externally referenced input actions in an Input Action Asset are not enabled by default.
6
6
7
-
The **Select Action**, **Activate Action**, and **UI Press Action** properties have corresponding **Select Action Value**, **Activate Action Value**, and **UI Press Action Value** properties. The [Action types](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/manual/Actions.html#action-types) of these actions are such that the former are usually [`Button`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/api/UnityEngine.InputSystem.InputActionType.html#UnityEngine_InputSystem_InputActionType_Button) type Actions, and the latter are optional [`Value`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.2/api/UnityEngine.InputSystem.InputActionType.html#UnityEngine_InputSystem_InputActionType_Value) type Actions. Each frame, the component will read whether the **Select Action** is performed to capture whether the select interaction state is active, and also capture the `float` value from the **Select Action Value**. If the **Select Action Value** is not set, the `float` value will be read from the **Select Action** instead. This process is repeated for the Activate and UI Press actions.
7
+
The **Select Action**, **Activate Action**, and **UI Press Action** properties have corresponding **Select Action Value**, **Activate Action Value**, and **UI Press Action Value** properties. The [Action types](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/manual/Actions.html#action-types) of these actions are such that the former are usually [`Button`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/api/UnityEngine.InputSystem.InputActionType.html#UnityEngine_InputSystem_InputActionType_Button) type Actions, and the latter are optional [`Value`](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.3/api/UnityEngine.InputSystem.InputActionType.html#UnityEngine_InputSystem_InputActionType_Value) type Actions. Each frame, the component will read whether the **Select Action** is performed to capture whether the select interaction state is active, and also capture the `float` value from the **Select Action Value**. If the **Select Action Value** is not set, the `float` value will be read from the **Select Action** instead. This process is repeated for the Activate and UI Press actions.
8
8
9
9
> [!NOTE]
10
10
> Having two Input Actions allows you as a developer to set the binding path for the **Select Action** to, for example, `<XRController>{LeftHand}/gripPressed` and set the binding for the **Select Value Action** to `<XRController>{LeftHand}/grip`. The threshold for the control being pressed is determined by the platform for `gripPressed` used for Select Action, and the axis amount can be read from `grip`. If you want to control the threshold yourself, you could consolidate both actions into a single Value type **Select Action** with an expected **Axis** control type and a binding path of `grip`, and add a **Press** Interaction where the **Press Point** can then be adjusted.
0 commit comments