Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [3.1.0-pre.1] - 2024-12-12

### Added
- Added the ability to trigger a 180° degree snap turn around on the Continuous Turn Provider directly instead of having to use a partially enabled Snap Turn Provider. Added properties to enable or disable left-right turning and turn around in the `ContinuousTurnProvider` to match the `SnapTurnProvider` options.
- Added support for anchor manipulation from controller thumbstick input to the Near-Far Interactor GameObject. The Interaction Attach Controller now has additional properties when Use Manipulation Input is enabled for allowing rotation (horizontal and vertical) and translation along the selection line.
- Added custom Inspector window for the Interaction Attach Controller.
- Added `GravityProvider` to handle gravity instead of being applied with the move and grab providers.
- Added `JumpProvider` to handle simple jumping functionality. This implements the added `IGravityController` interface.
- Added ability to control whether gravity begins to apply or stays paused when releasing with the `ClimbProvider`.
- Added a `SimulatedDeviceLifecycleManager` component that handles all the simulated devices, and works in tandem with simulator classes such as `XRDeviceSimulator`.
- Added a `SimulatedHandExpressionManager` component that handles the simulated hand expressions, and works in tandem with simulator classes such as `XRDeviceSimulator`.
- Added the new `XR Interaction Simulator` which provides a simplified interface for simulating XR interaction in the editor.
- Added public properties that wrap serialized fields in some behaviors and their corresponding Editor classes (`CurveInteractionCaster`, `XRInteractorLineVisual`, `XRRayInteractor`, and `UIInputModule`).

### Changed
- Changed the `XRI Default Input Actions` in the Starter Assets sample to include a Jump Input Action.
- Changed the XR Origin (XR Rig) prefab in the Starter Assets sample to include the `JumpProvider` and `GravityProvider` by default.
- Changed some APIs used by the `XRPokeInteractor` for enabling the ability to poke UGUI canvases from `internal` to `public` to allow for custom interactor implementations. (Forward port from 2.6.0)
- Changed Snap Turn Provider turn around behavior to only trigger once per turn around action. Repeat turns while the thumbstick is pushed in a direction will thus only apply to left or right.
- Changed the XR Origin (XR Rig) prefab in the Starter Assets sample to enable turn around on the Continuous Turn Provider so that functionality is enabled by default if Smooth Turn Enabled is true on the Controller Input Action Manager.
- Changed the Near-Far Interactor prefab in the Starter Assets sample to enable anchor manipulation (Translate and Horizontal Rotation).
- Changed `ContinuousMoveProvider` to implement the `IGravityController` interface.
- Changed `ContinuousMoveProvider` to handle falling movement differently than grounded movement.
- Changed `ClimbProvider` to implement the `IGravityController` interface.
- Changed `ClimbProvider` to zero out gravity accumulation while climbing by implementing the added `IGravityController` interface.
- Changed `ClimbProvider` to no longer force unconstrained movement through collisions (see `forceUnconstrained` in `XROriginMovement`).
- Changed scripts to improve performance of processing interaction strength (tagged `XRI.ProcessInteractionStrength` in Profiler).
- Changed some internal methods to be public or protected (`AttachPointVelocityTracker.ResetVelocityTracking`, `CurveInteractionCaster.OnDrawGizmosSelected`, and `XRBodyTransformer.OnDrawGizmosSelected`).
  • Loading branch information
Unity Technologies committed Dec 12, 2024
1 parent c940cd4 commit 85dce6d
Show file tree
Hide file tree
Showing 290 changed files with 40,715 additions and 1,464 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,44 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- Headers should be listed in this order: Added, Changed, Deprecated, Removed, Fixed, Security -->
<!-- Unreleased -->
## [3.1.0-pre.1] - 2024-12-12

### Added
- Added the ability to trigger a 180° degree snap turn around on the Continuous Turn Provider directly instead of having to use a partially enabled Snap Turn Provider. Added properties to enable or disable left-right turning and turn around in the `ContinuousTurnProvider` to match the `SnapTurnProvider` options.
- Added support for anchor manipulation from controller thumbstick input to the Near-Far Interactor GameObject. The Interaction Attach Controller now has additional properties when Use Manipulation Input is enabled for allowing rotation (horizontal and vertical) and translation along the selection line.
- Added custom Inspector window for the Interaction Attach Controller.
- Added `GravityProvider` to handle gravity instead of being applied with the move and grab providers.
- Added `JumpProvider` to handle simple jumping functionality. This implements the added `IGravityController` interface.
- Added ability to control whether gravity begins to apply or stays paused when releasing with the `ClimbProvider`.
- Added a `SimulatedDeviceLifecycleManager` component that handles all the simulated devices, and works in tandem with simulator classes such as `XRDeviceSimulator`.
- Added a `SimulatedHandExpressionManager` component that handles the simulated hand expressions, and works in tandem with simulator classes such as `XRDeviceSimulator`.
- Added the new `XR Interaction Simulator` which provides a simplified interface for simulating XR interaction in the editor.
- Added public properties that wrap serialized fields in some behaviors and their corresponding Editor classes (`CurveInteractionCaster`, `XRInteractorLineVisual`, `XRRayInteractor`, and `UIInputModule`).

### Changed
- Changed the `XRI Default Input Actions` in the Starter Assets sample to include a Jump Input Action.
- Changed the XR Origin (XR Rig) prefab in the Starter Assets sample to include the `JumpProvider` and `GravityProvider` by default.
- Changed some APIs used by the `XRPokeInteractor` for enabling the ability to poke UGUI canvases from `internal` to `public` to allow for custom interactor implementations. (Forward port from 2.6.0)
- Changed Snap Turn Provider turn around behavior to only trigger once per turn around action. Repeat turns while the thumbstick is pushed in a direction will thus only apply to left or right.
- Changed the XR Origin (XR Rig) prefab in the Starter Assets sample to enable turn around on the Continuous Turn Provider so that functionality is enabled by default if Smooth Turn Enabled is true on the Controller Input Action Manager.
- Changed the Near-Far Interactor prefab in the Starter Assets sample to enable anchor manipulation (Translate and Horizontal Rotation).
- Changed `ContinuousMoveProvider` to implement the `IGravityController` interface.
- Changed `ContinuousMoveProvider` to handle falling movement differently than grounded movement.
- Changed `ClimbProvider` to implement the `IGravityController` interface.
- Changed `ClimbProvider` to zero out gravity accumulation while climbing by implementing the added `IGravityController` interface.
- Changed `ClimbProvider` to no longer force unconstrained movement through collisions (see `forceUnconstrained` in `XROriginMovement`).
- Changed scripts to improve performance of processing interaction strength (tagged `XRI.ProcessInteractionStrength` in Profiler).
- Changed some internal methods to be public or protected (`AttachPointVelocityTracker.ResetVelocityTracking`, `CurveInteractionCaster.OnDrawGizmosSelected`, and `XRBodyTransformer.OnDrawGizmosSelected`).
- Changed `com.unity.xr.core-utils` dependency from 2.2.3 to 2.4.0.

### Deprecated
- Deprecated `useGravity` from `ContinuousMoveProvider` and the abstract `ConstrainedMoveProvider` (`GrabMoveProvider` and `TwoHandedGrabMoveProvider`). This functionality has been replaced with the Gravity Provider component and its `useGravity` property.
- Deprecated some nested types in `XRDeviceSimulator` and replaced them with either nested or unnested types within the `UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation` namespace.

### Fixed
- Fixed `BaseAffordanceStateProvider` so it passes the previous `AffordanceStateData` to custom affordance state receivers.

## [3.0.7] - 2024-11-06

### Added
Expand Down
3 changes: 2 additions & 1 deletion Documentation~/TableOfContents.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
* [XR Interaction Toolkit](index.md)
* [What's new in 3.0](whats-new-3.0.md)
* [What's new in 3.1](whats-new-3.1.md)
* [XRI 3.0 upgrade guide](upgrade-guide-3.0.md)
* Previous releases
* [What's new in 3.0](whats-new-3.0.md)
* [What's new in 2.6](whats-new-2.6.md)
* [What's new in 2.5](whats-new-2.5.md)
* [What's new in 2.4](whats-new-2.4.md)
Expand Down
2 changes: 1 addition & 1 deletion Documentation~/affordance-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Affordance receivers are components that receive `Affordance State` change event

## Affordance themes

Themes are a convenient way to encapsulate configuration for a specific type of `Affordance Receiver`. This makes it easy to create themes for any of the affordance data types and drive a uniform look and feel for the project. It also allows you to tweak settings in one place and not have to worry about updating each GameObject or prefab with those changes. Under the hood, an `Affordance Theme` is merely a [ScriptableObject](https://docs.unity3d.com/Manual/class-ScriptableObject.html) designed to use the newer [Datum](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.2/api/Unity.XR.CoreUtils.Datums.Datum-1.html) architecture along with some editor code to make them easier to visualize and configure.
Themes are a convenient way to encapsulate configuration for a specific type of `Affordance Receiver`. This makes it easy to create themes for any of the affordance data types and drive a uniform look and feel for the project. It also allows you to tweak settings in one place and not have to worry about updating each GameObject or prefab with those changes. Under the hood, an `Affordance Theme` is merely a [ScriptableObject](https://docs.unity3d.com/Manual/class-ScriptableObject.html) designed to use the newer [Datum](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.4/api/Unity.XR.CoreUtils.Datums.Datum-1.html) architecture along with some editor code to make them easier to visualize and configure.

The theme contains a list of affordance states and the values that should be blended during interactions. The Audio Affordance Theme contains Audio Clip references for when the state is either entered (**State Entered**) or exited (**State Exited**), and Unity will play them using [`AudioSource.PlayOneShot`](https://docs.unity3d.com/ScriptReference/AudioSource.PlayOneShot.html). The other Affordance Theme types (Color, Float, Vector2, Vector3, and Vector4) contains that typed value that is interpolated between two values: the start value (**Animation State Start Value**) and the target value (**Animation State End Value**). Above the list of states is the State Animation Curve. When each animation is triggered by the Affordance Receiver, it will use this curve to determine the value. 0 on the curve corresponds to the Start Value and 1 corresponds to the End Value. This animation curve can also be driven by the interaction strength or a custom script to provide even more flexibility in the way you want your effects to look and feel.

Expand Down
2 changes: 2 additions & 0 deletions Documentation~/continuous-turn-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ Locomotion provider that allows the user to smoothly rotate their rig continuous
|**Mediator**| The behavior that this provider communicates with for access to the mediator's XR Body Transformer. If one is not provided, this provider will attempt to locate one during its Awake call. |
|**Transform Priority**| The queue order of this provider's transformations of the XR Origin. The lower the value, the earlier the transformations are applied. |
| **Turn Speed** | The number of degrees/second clockwise to rotate when turning clockwise. |
| **Enable Turn Left Right** | Controls whether to enable left and right continuous turns. | |
| **Enable Turn Around** | Controls whether to enable 180° snap turns. |
| **Left Hand Turn Input** | Reads input data from the left hand controller. Input Action must be a Value action type (Vector 2). |
| **Right Hand Turn Input** | Reads input data from the right hand controller. Input Action must be a Value action type (Vector 2). |
2 changes: 1 addition & 1 deletion Documentation~/create-basic-scene.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you prefer to set up the XR Origin yourself, you can add a minimal one from t
> [!TIP]
> If you already have components that are referencing the original Camera GameObject, you may want to keep the original Camera instead. Drag the original Camera in the Hierarchy window to be a child GameObject of Camera Offset then reset the Transform by clicking the **More menu (&#8942;)** in the Inspector window next to Transform and select **Reset**. Then use the **More menu (&#8942;)** to **Copy Component** and **Paste Component As New** to move each additional component from the new Camera GameObject to your old Camera GameObject. Finally delete the new Camera GameObject and update **Camera GameObject** on XR Origin to your Camera.
The [XR Origin](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.2/manual/xr-origin.html) component on this GameObject transforms trackable devices like the head-mounted display and controllers to their final position in the Unity scene. This is the GameObject that is moved around the environment to achieve locomotion rather than applying movement directly to the Main Camera itself.
The [XR Origin](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.4/manual/xr-origin.html) component on this GameObject transforms trackable devices like the head-mounted display and controllers to their final position in the Unity scene. This is the GameObject that is moved around the environment to achieve locomotion rather than applying movement directly to the Main Camera itself.

The Camera Offset child GameObject that is created is automatically assigned as the value of **Camera Floor Offset Object** on XR Origin. This GameObject's position is updated automatically by Unity depending on the **Tracking Origin Mode** value on XR Origin.

Expand Down
Binary file modified Documentation~/images/continuous-turn-provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Documentation~/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The XR Interaction Toolkit package has several dependencies which are automatica
* [Input System (com.unity.inputsystem)](https://docs.unity3d.com/Packages/[email protected]/manual/index.html)
* [Mathematics (com.unity.mathematics)](https://docs.unity3d.com/Packages/[email protected]/manual/index.html)
* [Unity UI (com.unity.ugui)](https://docs.unity3d.com/Packages/[email protected]/manual/index.html)
* [XR Core Utilities (com.unity.xr.core-utils)](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.2/manual/index.html)
* [XR Core Utilities (com.unity.xr.core-utils)](https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.4/manual/index.html)
* Built-in modules
* [Audio](https://docs.unity3d.com/Manual/com.unity.modules.audio.html)
* [IMGUI](https://docs.unity3d.com/Manual/com.unity.modules.imgui.html)
Expand Down
11 changes: 10 additions & 1 deletion Documentation~/interaction-attach-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ Importantly the stabilization and smoothing options are configured by default to
| **Smooth Offset** | If true offset will be smoothed over time in XR Origin space. May present some instability if smoothing is toggled during an interaction. |
| **Smoothing Speed** | Smoothing amount for the anchor's position and rotation. Higher values mean more smoothing occurs faster. |
| **Use Distance Based Velocity Scaling**| Whether to use distance-based velocity scaling for anchor movement. |
| **Use Manipulation Input** | Whether to use manipulation input to move the anchor. |
| **Manipulation Input** | The input used to manipulate the anchor. |
| **X-axis Mode** | What the x-axis (left/right) of the manipulation input does when controlling the anchor. |
| **Y-axis Mode** | What the y-axis (up/down) of the manipulation input does when controlling the anchor. |
| **Combine Manipulation Axes** | Whether to allow simultaneous manipulation of both axes. Disable to allow only one axis of manipulation input at a time based on which axis is most actuated. |
| **Translate Speed** | Speed at which the anchor is translated when using manipulation input. |
| **Rotate Speed** | Speed at which the anchor is rotated when using manipulation input. |
| **Rotate Reference Frame** | The optional reference frame to define the rotation axes when the anchor is rotated when using manipulation input. |
| **Use Momentum** | Whether momentum is used when distance scaling is in effect. |
| **Momentum Decay Scale** | Decay scalar for momentum. Higher values will cause momentum to decay faster. |
| **Decay: Physical Movement** | Decay scalar for momentum when triggered with push/pull gesture. Higher values will cause momentum to decay faster. |
| **Decay: Input** | Decay scalar for momentum when triggered with manipulation input. Higher values will cause momentum to decay faster. |
| **Z Velocity Ramp Threshold** | Scales anchor velocity from 0 to 1 based on z-velocity's deviation below a threshold. 0 means no scaling. |
| **Pull Velocity Bias** | Adjusts the object's velocity calculation when moving towards the user. It modifies the distance-based calculation that determines the velocity scalar. |
| **Push Velocity Bias** | Adjusts the object's velocity calculation when moving away from the user. It modifies the distance-based calculation that determines the velocity scalar. |
Expand Down
2 changes: 1 addition & 1 deletion Documentation~/samples-starter-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ The `XR Origin (XR Rig)` prefab has the following hierarchy.
<tr>
<td colspan="5"><strong>XR Origin (XR Rig)</strong></td>
<td>
<a href="https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.2/manual/xr-origin.html">XR Origin</a><hr style="margin-top: 7px; margin-bottom: 7px;">
<a href="https://docs.unity3d.com/Packages/com.unity.xr.core-utils@2.4/manual/xr-origin.html">XR Origin</a><hr style="margin-top: 7px; margin-bottom: 7px;">
<a href="https://docs.unity3d.com/Manual/class-CharacterController.html">Character Controller</a><hr style="margin-top: 7px; margin-bottom: 7px;">
<a href="input-action-manager.md">Input Action Manager</a><hr style="margin-top: 7px; margin-bottom: 7px;">
<a href="xr-input-modality-manager.md">XR Input Modality Manager</a><hr style="margin-top: 7px; margin-bottom: 7px;">
Expand Down
2 changes: 1 addition & 1 deletion Documentation~/whats-new-2.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Within the [Starter Assets](samples-starter-assets.md) sample that ships with XR
Added support for teleportation directionality so that users can specify the direction they will face when teleportation finishes by rotating the thumbstick on a controller. This includes the addition of a `Teleport Direction` input action for each hand in the `XRI Default Input Actions` asset in the `Starter Assets` sample. If you already have a teleport controller setup in your scene, you will need to find the XR Ray Interactor component associated with one or both hands where the teleport controller lives and enable the checkbox for `Anchor Control`, then set the `Rotation Mode` to `Match Direction`. To enable teleport interactables in the scene to use directional input from the controllers, you will need to check the box for `Match Directional Input` on the **Teleportation Anchor** or **Teleportation Area**. Note that this option will only appear in the Inspector when the `Teleportation Configuration` option for `Match Orientation` is set to either `World Space Up` or `Target Up`.

> [!NOTE]
> As of version 3.0.0, Anchor Control has been renamed to Manipulate Attach Transform.
> As of version 3.0.0, Anchor Control has been renamed to Manipulate Attach Transform. As of version 3.1.0, Teleport Direction input action has been renamed to Manipulation.
We have also added a new **Grab Move Provider**. This method of locomotion can best be described as grabbing the world itself and pulling yourself through it. Each hand provides the means to translate yourself through the world space, but also included is a **Two-Handed Grab Move Provider**, which combines the **Grab Move Provider** on each hand and allows you to rotate and scale yourself in the world. The `XRI Default Input Actions` in the `Starter Assets` have been updated to include the appropriate actions to support this new mode of locomotion. For more information, read the documentation on [Locomotion](xref:xri-grab-movement), the [Grab Move Provider](grab-move-provider.md) and the [Two-Handed Grab Move Provider](two-handed-grab-move-provider.md).

Expand Down
Loading

0 comments on commit 85dce6d

Please sign in to comment.