Releases: needle-mirror/com.unity.xr.interaction.toolkit
Releases · needle-mirror/com.unity.xr.interaction.toolkit
2.4.0-pre.1
[2.4.0-pre.1] - 2023-05-25
Added
- Added hands support to XR Device Simulator. You must have the XR Hands package installed in your project to use this new functionality.
- Added Is Tracked action to XR Controller (Action-based), and updated presets and prefabs in Starter Assets sample to make use of the new Is Tracked input actions in the
XRI Default Input Actions. - Added properties in the
ARGestureInteractorclass to control raycast behavior for gestures. - Added the
IXRPokeFilterinterface to allow other classes to act as customized poke filters for theXRPokeInteractorinstead of only supporting theXRPokeFiltercomponent. - Added XR Interactor Affordance State Provider component which can drive affordance receivers using interactor interactions events.
- Added Color Gradient Line Renderer Affordance Receiver to pair with an XR Interactor Affordance State Provider on a Ray interactor to improve visual coloring. Has a property to automatically disable coloring of XR Interactor Line Visual.
- Added Hand Menu component, as well as a sample prefab of a working hand menu in the Hands Interaction Demo sample.
HandMenucomponent has a split configuration for hands and controllers, with a newFollowPresetDatum.- Added gaze activation settings and a reveal/ hide hand menu animation.
- Added XR Input Modality Manager component which manages swapping between hand and controller hierarchies in the XR Origin. Updated prefabs in the package samples to make use of this component.
- Added ability for XR Interactor Line Visual to curve accurately and track interactable attach points during selection.
- Added Auto Adjust Line Length property to XR Interactor Line Visual to retract the line end after a delay when the ray interactor doesn't hit any valid targets.
- Added the XR Gaze Assistance component to enable split interaction. Eye for aiming and controllers for selection.
- Added the
IXRRayProviderinterface to allow other ray implementations to take advantage of split interaction. - Added
Focus Stateto interactables. An interactable that is selected is also focused; it remains focused until another interactable is focused instead. Useful for highlighting an object to later perform operations on. - Added Visit Each Frame property to XR Controller Recorder to control whether each frame of the input recording must be played back regardless of the time period passed.
- Added XR Transform Stabilizer component that applies optimized stabilization techniques to remove pose jitter and makes aiming and selecting with rays easier for users.
- Added Climb Provider, which provides locomotion counter to interactor movement while the user is selecting a Climb Interactable.
- Added menu item Assets > Create > XR > Locomotion > Climb Settings, which creates a Climb Settings Datum asset.
- Added a Climb Provider instance to
XR Origin Preconfiguredin the Starter Assets sample. - Added
Climb Sampleprefab to the Starter Assets sample, and added an instance of this prefab toDemoScene. This prefab includes preconfigured Climb Interactables.
- Added support for XRRayInteractors to scroll UI panels using the thumbstick.
- IUInteractors now support UIHoverEnter and UIHoverExit events.
- UIInputModule gains the trackedScrollDeltaMultiplier property to control scrolling speeds via thumbstick.
- TrackedDeviceModel gains properties for current UI Selectable and if the selected UI is scrollable.
- ActionBasedController gains a property for UI scrolling input, set to the thumbstick in the starter assets.
- Added configuration of interaction overrides to XR Interaction Group, allowing certain Group members to take control of interaction when attempting to select, regardless of priority.
- Added Direct Interactor as an interaction override for Poke Interactor in each XR Interaction Group in
XR Origin (XR Rig)in Starter Assets sample. - Added new Shader Graphs and Materials in
Hand Interaction Demofor a transparent hand that supports highlighting fingers - Added the
TouchscreenGestureInputControllerwhich allows users to surface touchscreen gesture data via the Input System. - Added the
XRScreenSpaceControllerwhich enables usage of screenspace input, from touchscreen or mouse, with interactors. - Added the
enableARRaycastingproperty toXRRayInteractorwhich enables raycasting against the AR environment if AR Foundation is installed.
Changed
- Changed
XRControllerStateby adding anisTrackedfield. Deprecated old constructors, users should update their code to call the ones with the added parameter. - Changed XRI project validation to only log errors to the console, not warnings.
- Changed XR Interactor Line Visual so it bends to the selected interactable by default. Set Line Bend Ratio to 1 to revert to the old behavior where the line would remain straight.
- Changed XR Interactor Line Visual default value of Line Width from 0.02 to 0.005.
- Improved performance of the line visual and ray interactor by optimizing most of the line computation math for the Burst compiler. The Burst package must be installed in your project to take advantage of the optimizations.
- Changed
XRInteractorLineVisualby adding theOnDestroyandLateUpdatemethods. Users who had already implemented either method in derived classes will need to call the base method. - Changed
XRInteractorReticleVisualby adding theOnDisablemethod so it disables the reticle when the component is disabled. Users who had already implemented that method in derived classes will need to call the base method. - Changed
TeleportationAnchor.GetAttachTransformmethod to return theteleportAnchorTransformvalue. - Renamed Starter Assets sample prefabs:
- Renamed
Complete XR Origin Set Upprefab toXR Interaction Setup. - Renamed
XR Originprefab toXR Origin (XR Rig). - Renamed
Complete Teleport Area Set Upprefab toTeleportation Environment.
- Renamed
- Renamed Hands Interaction Demo sample prefabs:
- Renamed
Complete XR Origin Hands Set Upprefab toXR Interaction Hands Setup. - Renamed
XR Origin Handsprefab toXR Origin Hands (XR Rig).
- Renamed
- Changed
XR Origin (XR Rig)to reorganize locomotion components to new GameObjects. - Changed
XR Origin (XR Rig)to disable grab move locomotion by default. Activate the Grab Move GameObject to re-enable that functionality. - Changed
XR Origin Hands (XR Rig)to be a prefab variant of theXR Origin (XR Rig)prefab. - Changed Starter Assets sample prefabs by adding XR Gaze Fallback to the XR Origin GameObject.
- Changed
XRRayInteractor,XRInteractorLineVisual, andXRInteractorReticleVisualto support mediation through split interaction. - Changed XR Ray Interactor to no longer interact with UGUI Canvases while selecting an interactable.
- Changed XR Ray Interactor so the Hover To Select property will now activate with UI elements.
2.3.2
[2.3.2] - 2023-04-28
Changed
- Changed XRI project validation to only log errors to the console, not warnings.
- Updated
XRPokeFollowAffordancesmoothing property default from 8 to 16 to make it feel more responsive.
Fixed
- Added additional checks against AR Foundation 5.0 and newer so deprecation messages and the use of the newer XR Origin (AR) is hidden when using AR Foundation 4.2 and older.
- Fixed GC allocations produced each frame by
XRPokeInteractor.UpdateUIModel. - Fixed frame-timing for Locomotion Input Tests when running in batch mode.
XRInteractableAffordanceStateProviderFixes:- Activated state was lower priority than selected, which because select is not exited, this was causing issues with it not appearing.
- There were some racing coroutines between select and activate, and now trigger a new animation blocks previous animations
- Leaving the select state cancels select animations that might not have completed
- Leaving activated state cancels activate animations that might not have completed
- Fixed repeat audio issue in the
AudioAffordanceReceiverby adding extra conditions which treat select as a modifier to hover, and activated as a modifier to select. Doing this prevents triggering repeat audio clips that shouldn't fire, like releasing the activate trigger, or releasing the select trigger while still hovering. - Fixed
XRPokeLogicissue where poking from behind objects would sometimes trigger select incorrectly. - Fixed
XRPokeLogicissue where depth percent was incorrectly calculated using an exponential value which would result in poke buttons feeling disconnected from the poke interactor position.
2.3.1
[2.3.1] - 2023-03-27
Added
- Added System Gesture Detector component to the Hands Interaction Demo sample to add system gesture and menu palm pinch gesture events. Added sound upon menu press as an example. Added Aim Flags input actions to the
XRI Default Input Actionsin the Starter Assets sample to support this. - Added Interaction filters documentation for
IXRHoverFilter,IXRSelectFilter,IXRInteractionStrengthFilter, and the corresponding filter delegates with examples.
Changed
- Changed the Poke Gesture Detector component in the Hands Interaction Demo sample to no longer end the poke gesture when hand tracking is lost. This fixes the Ray Interactor line visual reappearing when hand tracking is lost while doing the poke gesture.
- Changed
XRInteractorReticleVisualto ensure consistent attempts to align the reticle prefab'szaxis with thetransform.upof the XROrigin whenAlignPrefabWithSurfaceNormalistrueand aligning with a non-horizontal surface. - Changed
XRInteractorReticleVisualto align the reticle prefab'szaxis with the forward direction of the reticle's interactor whenAlignPrefabWithSurfaceNormalistrueand aligning with a horizontal surface. - Updated installation documentation with convenience links for installing the XRI package on older versions of Unity 2021 where the package was not included in the main Editor manifest.
- Changed so UGUI poke interactions are now considered to be blocking interactions for interaction groups. This allows rays to be properly hidden when hovering or selecting a UGUI canvas with poke.
- Changed to use velocity estimation of poke interactor to add an extra validation mechanism in the XR Poke Filter hover validation check to allow poke selection to occur in cases where it was previously rejected, while still preventing poking from behind and other non-desireable cases.
- Changed to cache poke selection validation check so that it's easier to hold a poke when the selection conditions are met. This makes scrolling UGUI canvases easier and makes poke interactions feel more consistent.
- Changed AR Scale Interactable so changing the Min Scale and/or Max Scale during runtime will keep the current object scale if still within range instead of resizing the object to keep the same scale ratio.
Fixed
- Fixed the Hands Interaction Demo sample to wait to activate the controller GameObjects until they are reconnected instead of each time hand tracking is lost. Also fixed the controllers appearing at the origin if they have never been tracked.
- Fixed the Hands Interaction Demo sample so it disables the hand interactors while doing a system gesture (such as a user looking at their open palm at eye level).
- Fixed warning about a self-intersecting polygon in the
Frame.fbxmodel in the Hands Interaction Demo sample. - Fixed warning in Hands Interaction Demo sample about obsolete API usage coming from the hands subsystem.
- Fixed
XRSimulatedControllerandXRSimulatedHMDto have identifying characteristics information in thecapabilitiesfield of their correspondingInputDeviceDescription. (XRIT-50) - Fixed an issue in the
XRControllerclass where theinputDeviceproperty was not reinitialized when thecontrollerNodeproperty was changed. (XRIT-52) - UGUI ray interactions are now correctly blocked when interaction groups block ray interactions and the ray is hidden.
- Fixed an issue with
TrackedDeviceGraphicRaycaster, when using theXRPokeInteractoron UGUI canvases with different sort orders, where interaction was blocked on all but the highest Order in Layer valued canvas. (XRIT-48) - Fixed an issue with
TrackedDeviceGraphicsRaycaster, where opening a dropdown would block all other UGUI canvases to become non-interactable with anXRPokeInteractoruntil the dropdown was closed. - Fixed the
Starter AssetsandHands Interaction Demoprefabs which contained components and shaders with a mix of both Built-in Render Pipeline and Universal Render Pipeline. They are all now using Built-in Render Pipeline for consistency. - Fixed
XRInteractorReticleVisualincorrect rotation aroundyaxis when aligning prefab to surface normal. (XRIT-18) - Fixed
XRInteractorReticleVisualincorrect rotation whenAlignPrefabWithSurfaceNormalisfalse. - Fixed
XRInteractorReticleVisualinconsistent rotation whenAlignPrefabWithSurfaceNormalandDrawOnNoHitaretruebut there is no active hit. - Fixed
UIInputModuleissue where tracked devices cannot drag on UI elements whenCursor.lockStateis set toLocked.
2.3.0
[2.3.0] - 2023-02-17
Added
- Added a Raycast Snap Volume Interaction property to control whether the XR Ray Interactor will collide with or ignore trigger snap colliders from an XR Interactable Snap Volume (used by gaze assistance). This allows a user to set Raycast Trigger Interaction to Ignore but still collide with trigger colliders that are associated with a snap volume.
- Added options to XR Poke Follow Affordance in the Starter Assets sample to apply the follow animation if the poke target is a child and to clamp the follow target to a maximum distance from the poke target.
- Added an XR Poke Follow Affordance to the
TextButtonprefab in the Starter Assets sample so that the button graphics can move in response to poke. - Added Tracking State and Is Tracked input actions to the
XRI Default Input Actionsin the Starter Assets sample. - Added Meta Gaze Adapter sample to allow developers to request permission and initialize eye tracking for the Meta Quest Pro.
- Added Hands Interaction Demo sample to demonstrate interactions with hand tracking.
- Added poke interaction examples to the
DemoScenein the Starter Assets sample. - Added ability to customize the layer mask and trigger interaction when the XR Poke Interactor performs the physics sphere overlap call.
- Added documentation regarding behavior when Select Action Trigger is set to State on XR Direct Interactor and XR Ray Interactor.
Changed
- Changed the Stop Manipulation action (default binding
Escape) in the XR Device Simulator to always stop manipulation every time it is pressed instead of cycling between None and FPS mode. Trigger the Cycle Devices action (default bindingTab) to switch back to FPS mode instead. - Changed
Ray Interactorprefab in the Starter Assets sample to enable Treat Selection As Valid State on the XR Interactor Line Visual. - Changed the GameObject > XR > Grab Interactable menu item to set the Rigidbody Interpolate property on the created GameObject to Interpolate.
- Changed the Rigidbody Interpolate property from None to Interpolate in each of the Starter Assets sample grab interactable prefabs.
- Changed the default value of the Color Property Name property on the Color Material Property Affordance Receiver component to an empty string instead of
"_BaseColor". An empty string will now use either"_BaseColor"or"_Color"depending on the current render pipeline to add support for the Built-In Render Pipeline. - Changed
GetValidTargetson each interactor type to return an empty list when the interactor is disabled. - Changed
ActionBasedControllerManagerin Starter Assets sample to make use of XR Interaction Group and removed some unused serialized fields. - Changed
XR Origin Preconfiguredin Starter Assets sample so it instantiates the controller model prefab at runtime instead of being in the prefab hierarchy to make it easier for users to override the model used. - Changed
Teleport Interactorin Starter Assets sample so it instantiates the reticle prefabs at runtime instead of being in the prefab hierarchy to make it easier for users to override the reticle used. - Changed
com.unity.xr.core-utilsdependency to 2.2.0.
Fixed
- Fixed Teleportation Anchor incorrectly triggering a teleport when the Ray Interactor stops pointing at the anchor when it no longer has any ray cast hits.
- Fixed Starter Assets sample prefabs and
DemoSceneto have the Gaze Interactor prefab. - Fixed
XRPokeInteractorso it uses thetargetFilterfor filtering the valid targets returned byGetValidTargets. - Fixed the Fix button for project validation issue "Interaction Layer 31 is not set to 'Teleport'" not persisting to the settings asset when closing the Unity Editor.
- Fixed missing references in device simulator UI button images by assigning to null.
- Fixed the
PokeStateDatathat is generated from UI poke interaction so that itsaxisAlignedPokeInteractionPointis relative to the world position of the target transform. - Fixed broken click animations in
XRInteractableAffordanceStateProvider. - Fixed XR Device Simulator so it will use the new main camera if the previous one is disabled or destroyed.
- Fixed issue where AR gestures did not take into account UI in
ARBaseGestureInteractablebehaviors (such as AR Placement Interactable) by adding anexcludeUITouchesproperty, which is enabled by default. - Fixed potential invalid stayed colliders list in
XRDirectInteractorandXRSocketInteractorwhen the interactor is disabled while in contact with a collider. - Fixed hover and select events being incorrectly fired when an
XRDirectInteractororXRSocketInteractorGameObject or component is disabled while in contact with an interactable, moved away from the interactable, and then enabled. - Fixed XR Poke Interactor to query the local PhysicsScene instead of using static physics calls.
- Fixed poke in UI scrolling in a scroll view outside of the viewport by ensuring the Tracked Device Graphic Raycaster respects the alpha hit test threshold.
- Fixed the
Teleport Anchorprefab in Starter Assets to place the teleport destination at the top of the platform, fixing a bump that would occur when moving with locomotion after teleporting.
2.3.0-pre.1
[2.3.0-pre.1] - 2022-12-07
Added
- Added new Affordance System. This introduces the XRI Affordance state provider, which connects to an XR Interactable to determine new affordance states, which then power Affordance Receivers to animate tweens using Affordance Theme scriptable Objects. This can be used for audio, ui, material and other kinds of animation tweens, reactive to interaction state changes, all powered by the Job System.
- Added an option to Edit > Project Settings > XR Interaction Toolkit to automatically instantiate the prefab in the XR Device Simulator sample.
- Added XR Interaction Group component, which allows only one member Interactor or Group within the Group to be interacting at a time.
- Added the option Disable Visuals When Blocked In Group to XR Base Interactor, which controls whether to disable the Interactor's visuals when the Interactor is part of an Interaction Group and is unable to interact due to active interaction by another Interactor in the Group. This option is enabled by default.
- Added an XR Interaction Group to each hand in the
XR Origin Preconfiguredprefab in theStarter Assetssample. Each Group prioritizes Direct interaction over Ray interaction. - Added a runtime UI for the XR Device Simulator. Users can now also move the player position around the physical play space using
WASDandQ/Eto simulate the user walking around. Reimport the XR Device Simulator sample to access this new functionality and UI. - Added ability to control the tracking state of the simulated devices in the XR Device Simulator Inspector window.
- Added properties to XR Device Simulator to control the
[0.0, 1.0]amount of the simulated grip and trigger inputs when those controls are activated. - Added lazy follow functionality for UI which can be enabled by adding the LazyFollow component to a GameObject.
- Added
IXRInteractionStrengthInteractorandIXRInteractionStrengthInteractableinterfaces that are implemented byXRBaseInteractorandXRBaseInteractable, respectively. These add additional properties and methods related to interaction strength, which conveys a variable (that is, analog) selection interaction strength between an interactor and interactable. This is typically based on a motion controller's grip or trigger amount, or based on a poke depth for those interactable objects that support being poked. - Added the
IXRInteractionStrengthFilterinterface. Instances of this interface can be added to Interactables to extend their interaction strength computation without needing to create a derived class. - Added
IsHoveredandIsSelectedmethods toXRBaseInteractablethat works similarly toIsHoveringandIsSelectingonXRBaseInteractorfor querying whether a specific interactor is hovering or selecting that interactable. - Added XRPokeInteractor and XRPokeFilter classes that provide basic poking functionality for both hands and controllers.
- Added XR Poke Follow Affordance component in the
Starter Assetssample to control the smooth visual pressing of a Transform component (such as a button, for example) driven by the current select value of a poke interaction. - Added XR General Grab Transformer which supports moving and rotating unconstrained with one or two interactors, and scaling when using two interactors.
- Added
XRGazeInteractor, driven by either eye-gaze or head-gaze pose information. This allows a developer to use eye or head gaze to hover or select by dwelling on interactables. - Added
XRInteractableSnapVolumeto allow snapping a ray interactor to a nearby target interactable. This can be combined with theXRGazeInteractorto achieve gaze-assisted hover and selection. - Added Gaze Configuration properties to
XRBaseInteractablerelated to gaze interactions, automatic selection and deselection from hover, and gaze-assisted hover and selection. - Added a
drawOnNoHitproperty toXRInteractorReticleVisualthat forces the reticle to draw when no ray cast hits are detected. - Added a
snapEndpointIfAvailableproperty toXRInteractorLineVisualto allow bending the visual ray towards a specified target point, such as guided by anXRInteractableSnapVolumefor more user-friendly object selection. - Added
Eye Gaze PositionandEye Gaze Rotationactions to theXRI Default Input Actionsasset along with correspondingXRI Default Gaze Controllerpreset to theStarter Assetssample. - Added an Integer Fallback Composite binding for Input System input actions, which is useful for a tracking state action. This composite works similarly to the Vector 3 Fallback and Quaternion Fallback Composite bindings.
- Added
GetCustomReticlemethod toXRBaseInteractableto allow lookup of the custom reticle associated with a particular Interactor. - Added
Poke Interactorto each hand in theComplete XR Origin Set Upprefab inStarter Assets
Changed
- Changed the default grab transformers from XR Single Grab Free Transformer and XR Dual Grab Free Transformer to XR General Grab Transformer. This new grab transformer does not respond to the pose of the Attach Transform of the XR Grab Interactable changing while grabbed. If you need to modify the pose after being grabbed, you will need to add a different grab transformer from the Component > XR > Transformers menu.
- Changed GameObject > XR > Grab Interactable to add the XR General Grab Transformer component by default.
- Changed XR Grab Interactable to re-initialize the dynamic attach pose when changing from multiple grabs back to a single grab by default. Disable Reinitialize Every Single Grab (
reinitializeDynamicAttachEverySingleGrab) for previous behavior. - Changed
XRDeviceSimulatorto destroy itself if another instance already exists at runtime. - Changed XR Device Simulator to initialize the simulated controllers to position them in front of the HMD instead of at (0, 0, 0).
- Changed XR Device Simulator to start manipulating the HMD and controllers as if the whole player was turning their torso, similar to a typical FPS style configuration, to simplify its use. Press
Tabto cycle between manipulating all devices in this mode, the left controller individually, and the right controller individually. - Changed GameObject > XR > XR Origin (VR) to set the Tracking State Input property on the Tracked Pose Driver of the Main Camera on versions of Input System that support it.
- Changed
XRSimulatedControllerandXRSimulatedHMDto report support for updating during the before render phase. - Changed
DefaultExecutionOrderof theXRInteractionManagerfrom-100to-105. - Changed
InteractorRegisteredEventArgsby adding acontainingGroupObjectproperty of typeIXRInteractionGroupwhich is set when the Interactor is contained in an Interaction Group. - Changed
XRBaseInteractableinitialization logic of theIXRInteractable.colliderslist to exclude trigger colliders when no colliders are set in the Inspector window. - Changed
XRInteractableUtility.TryGetClosestColliderandXRInteractableUtility.TryGetClosestPointOnColliderto ignore trigger colliders. - Changed the default value of Select Action Trigger (
XRBaseControllerInteractor.selectActionTrigger) on interactors from State to State Change. - Changed
com.unity.inputsystemdependency to 1.4.4. - Changed
com.unity.xr.core-utilsdependency to 2.2.0-pre.2. - Changed
com.unity.xr.legacyinputhelpersdependency to 2.1.10.
Fixed
- 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.
- Fixed issue with
RegistrationListandSmallRegistrationListwhere unregistering and then registering an item that already exists in the registered snapshot would result in the item being counted twice due to being added to the buffered add list. - Fixed issue with
RegistrationListandSmallRegistrationListwhere unregistering an item that was not yet flushed to the registered snapshot would result in the list returning an incorrectflushedCountdue to being incorrectly added to the buffered remove list instead of just removing from the buffered add list. - Fixed issue with
RegistrationListnot reporting the registration status of items added viaMoveItemImmediately. - Fixed Grab Transformers (that derive from
XRBaseGrabTransformer) to skip automatic registration specified byregistrationModewhen it has already been added to theXRGrabInteractable. It previously only checked the Starting Single/Multiple Grab Transformers lists. - Fixed expansion state of Select Filters in the Inspector window reusing the Hover Filters state in some cases.
- Fixed
XRRayInteractornull reference exception that causes editor spam when sample points are deleted upon hot-reload. - Fixed incorrectly false return values for
AddCustomReticleandRemoveCustomReticleon the `XRInteractorLin...
2.0.4
[2.0.4] - 2022-10-19
Changed
- Ray casts now query the local PhysicsScene 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 anInput Action Managercomponent and sets theAction AssetstoXRI Default Input Action.inputactionsasset if available from theStarter Assetssample package.
Fixed
- Fixed XR Interactor Line Visual so it deactivates the current reticle GameObject when the behavior is enabled or disabled.
- Fixed
XRUIInputModuleto 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
XRInteractorReticleVisualscript did not properly detect ray casts with UI objects. (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 with the
XRDeviceSimulatorwould cause the device simulator's rotation to be overwritten. This issue can also be fixed by upgrading the Input System package 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.
2.2.0
[2.2.0] - 2022-09-30
Added
- Added ability for the target position, rotation, and scale of an XR Grab Interactable to be calculated by another component. Developers can derive from XRBaseGrabTransformer and add those components to the same GameObject as the XR Grab Interactable. The existing logic was moved to XRSingleGrabFreeTransformer. For more information, see Grab transformers.
- Added properties
allowHoverAudioWhileSelectingandallowHoverHapticsWhileSelectingtoXRBaseControllerInteractor, which control whether to allow the Interactor from playing audio and haptics, respectively, in response to a Hover event if the Hovered Interactable is currently Selected by the Interactor. - Added property
stopLineAtSelectiontoXRInteractorLineVisual, which controls whether the line will stop at the attach point of the closest interactable selected by the interactor, if there is one. - Added property
treatSelectionAsValidStatetoXRInteractorLineVisual, which forces the use of valid state visuals while the interactor is selecting an interactable, whether or not the interactor has any valid targets. - Added support for teleportation directionality so that users can specify the direction they will face when teleportation finishes.
- Added a
Teleport Directioninput action for each hand in theXRI Default Input Actionsasset in theStarter Assetssample. - Added the property
anchorRotationModeas an option for howXRRayInteractorcontrols anchor rotation.RotateOverTimeis the existing and default behavior, which is useful for rotating a held object. The other option isMatchDirection, which is useful for controlling teleportation direction by matching rotation to the direction of the 2-dimensional input. - Added input options for directional anchor rotation to
ActionBasedControllerandXRController. - Added the property
matchDirectionalInputas an option for aBaseTeleportationInteractableto apply directional input (based on anchor rotation) when itsmatchOrientationis set toWorldSpaceUporTargetUp. - Added an interface
IXRReticleDirectionProviderfor teleportation interactables to override the direction of the reticle.
- Added a
- Added
Fixedupdate type to XRBaseController which is in sync withMonoBehavior.FixedUpdate. - Added the
IXRTargetPriorityInteractorinterface that allow Interactors to monitor the Interactables priority for selection in the current frame. There are different monitoring options (None, Highest Priority Only, and All) with different performance tradeoffs. - Added the
XRInteractionManager.IsHighestPriorityTargetmethod to check if an Interactable is the highest priority candidate for selection of an Interactor (IXRTargetPriorityInteractor) in the current frame, which is useful for custom affordance feedback. - Added the
IXRHoverFilterinterface. Instances of this interface can be added to Interactors, Interactables, or to the Interaction Manager to extend their hover validations without needing to create a derived class. - Added the
IXRSelectFilterinterface. Instances of this interface can be added to Interactors, Interactables, or to the Interaction Manager to extend their select validations without needing to create a derived class. - Added color gradient and reticle options to XR Interactor Line Visual for when the Interactor has a valid target but it selection is blocked. These can be configured by setting the properties Blocked Color Gradient and Blocked Reticle, respectively.
- Added the
publicmethodCanHovertoXRInteractionManager, which checks whether a given Interactor is able to hover a given Interactable. - Added the
publicmethodCanSelecttoXRInteractionManager, which checks whether a given Interactor is able to select a given Interactable. - Added the
publicmethodIsHoverPossibletoXRInteractionManager, which checks whether a given Interactor would be able to hover a given Interactable if the Interactor were in a state where it could hover. - Added the
publicmethodIsSelectPossibletoXRInteractionManager, which checks whether a given Interactor would be able to select a given Interactable if the Interactor were in a state where it could select. - Added Enable Fly option to Continuous Move Provider, which allows for unconstrained movement in any direction.
- Added properties
filterSelectionByHitNormalandupNormalToleranceDegreestoBaseTeleportationInteractable, which are used to configure whether a user can teleport to a location if the hit normal is not aligned with the interactable's up vector. - Added Grab Move Provider and Two Handed Grab Move Provider, which provide locomotion based on tracked controller position while a button is held. Grab Move Provider provides translation of the user, and Two Handed Grab Move Provider provides translation, yaw rotation, and uniform scaling of the user.
- Added a
Grab Moveinput action for each hand in theXRI Default Input Actionsasset in theStarter Assetssample. - Added
XRI Default Left Grab MoveandXRI Default Right Grab Movepresets to theStarter Assetssample. - Added
ConstrainedMoveProviderbase class forGrabMoveProviderandTwoHandedGrabMoveProvider, to hold logic for constrained movement with aCharacterController.
- Added a
Changed
- Changed XR Grab Interactable to support being selected by multiple Interactors. To enable that ability in the Inspector window, set Select Mode to Multiple. If your derived class does not properly handle multiple selections and you want to disable the Multiple option, you will need to add
[CanSelectMultiple(false)]to your component script. - Ray casts now query the local PhysicsScene 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. - Changed
XRInteractionManagerby adding theAwakemethod. Users who had already implementedAwakein derived classes will need to call the base method. - Creating a new
XR Origin (VR)now automatically adds anInput Action Managercomponent and sets theAction AssetstoXRI Default Input Action.inputactionsasset if available from theStarter Assetssample package. - Move speed in Continuous Move Providers and line width in XR Interactor Line Visual are now scaled by the scale of the XR Origin.
- Changed the Ray Interactor GameObject created through the GameObject > XR create menu to have a Sorting Group to make it render in front of UI and changed the
TunnelingVignetteprefab in the Tunneling Vignette sample to have a Sorting Group to make it render in front of the Line Renderer of a Ray Interactor. - Changed minimum supported version of the Unity Editor from 2019.4 to 2020.3 (LTS).
Fixed
- 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 using the MockHMD XR Plugin package with the
XRDeviceSimulatorwould cause the device simulator's rotation to be overwritten. This issue can also be fixed by upgrading the Input System package to 1.4.1+. - Fixed issue where
XRInteractorReticleVisualscript did not properly detect ray casts with UI objects. (XRIT-18) - Fixed an issue with throwing physics on Quest devices where bad frame-timing would cause unexpectedly high velocities to be applied.
- Fixed "Retrieving array element that was out of bounds" error when viewing the Tunneling Vignette Controller in the Inspector window when the Locomotion Vignette Providers list is empty.
- Fixed XR Interactor Line Visual so it deactivates the current reticle GameObject when the behavior is enabled or disabled.
2.1.1
[2.1.1] - 2022-07-29
Added
- Added
enableBuiltInActionsAsFallbackproperty onXRUIInputModuleto provide a fallback default behavior out of the box when using the new Input System as the Active Input Handling. - Added missing documentation for
UI Setupthat specifies how to perform object occlusion for UI objects when using the Tracked Device Graphics Raycaster component. - Added a warning message to the Inspector of XR Interactor Line Visual and XR Interactor Reticle Visual when the Reticle has a Collider which may disrupt the ray cast. This added an
XRInteractorReticleVisualEditorclass.
Changed
- Changed the dynamic attach behavior of XR Grab Interactable so it only ignores the Match Position property when being grabbed by an XR Ray Interactor with Force Grab enabled instead of ignoring both Match Position and Match Rotation. This lets you bring the object to your hand while keeping the rotation if configured. To make it easier to override the dynamic attach properties for a selecting interactor, the
protectedmethodsShouldMatchAttachPosition,ShouldMatchAttachRotation, andShouldSnapToColliderVolumewere added toXRGrabInteractable. - Updated Editor tooltip and documentation to clarify how the Stop Line At First Raycast Hit property works on the XR Interactor Line Visual component. (XRIT-4)
Fixed
- Fixed rendering of the Tunneling Vignette causing issues like the Line Renderer cutting short by setting
ZWrite Offin the shader. If the sample has already been imported into your project, you will need to import again to get the update. - Fixed so the
TunnelingVignettematerial asset does not get modified by theTunnelingVignetteController. - Fixed
GetValidTargetsperformance when there are several Interactors in the scene hovering one or no Interactables. - Fixed missing input binding for the
Moveaction in theXRI RightHand LocomotionAction Map in the XRI Default Input Actions asset inside theStarter Assetssample. - Fixed the Rotate Anchor and Translate Anchor input bindings in the XRI Default Input Actions asset to be simpler by not using composite bindings.
- Fixed
CharacterControllerDriverso it will try to find theContinuousMoveProviderBaseon other active GameObjects if it isn't on the same GameObject.
2.0.3
[2.0.3] - 2022-07-26
Fixed
- Fixed the simulated HMD and controllers so they no longer reset to origin after switching focus away and back to the Unity Editor. (1409417)
- Fixed warnings about setting velocities of a kinematic body when updating an XR Grab Interactable with Movement Type set to Kinematic.
- Fixed
UIInputModuleso it will use the new Main Camera if the previous one is disabled whenUIInputModule.uiCamerais not set. - Fixed warning in the Inspector window for interactors missing the XR Controller component when the GameObject is deactivated by changing the find method to include inactive GameObjects.
- Fixed XR Interactor Line Visual so it will instantiate the Reticle GameObject when it is a Prefab asset so it does not modify the asset on disk.
- Fixed
UIInputModuleto support EventSystemIPointerMoveHandlerfor Unity 2021.1 and newer. Also added the correspondingpointerMoveevent toUIInputModuleto allow the pointer move events to be globally handled.
2.1.0-pre.1
[2.1.0-pre.1] - 2022-05-02
Added
- Added properties to XR Grab Interactable to use dynamic attach transforms so the grab pose will be based on the pose of the Interactor when the selection is made. You can enable the Use Dynamic Attach property to keep the object in the same position and rotation when grabbed. (1373337)
- Added filtering for interactions to help determine the intent of the user. The new abstractions XR Target Filter and XR Target Evaluator let users configure and extend the logic of how an Interactor ranks an Interactable from a list of valid ones, specifically in the
GetValidTargetsmethod. Several different evaluators are included in this update, and custom ones can be created. This makes it easier to customize the Interactor without needing to create a derived behavior. - Added the
XRBaseInteractable.distanceCalculationModeproperty. This give users the ability to configure how an Interactable calculates its distance to a location, such as to an Interactor for sorting its valid targets, at varying tradeoffs between accuracy and performance. - Added the
XRBaseInteractable.getDistanceOverrideproperty that lets users assign a method to be called when the Interactable is performing a distance calculation to a location, which is used when the Interactor is ordering its valid targets. This property makes it easier to customize the Interactable without needing to create a derived behavior. - Added
IsOverUIGameObjectfunction toXRRayInteractorthat does a simple check to see if the ray cast result is hitting a UI GameObject. - Added
InputActionReferenceproperties to theXRUIInputModulefor left/right/middle clicks, navigation move, submit, cancel, scroll and pointer movement actions. This allows for greater flexibility and customization of what devices can drive UI input when using theXRUIInputModule. - The
XRI Default Input Actionsasset in theStarter Assetssample package now includes anXRI UIAction Map for UI-specific Input Actions. Also included is a Preset asset to quickly map the actions onto theXRUIInputModulecomponent. - Added a Tunneling Vignette sample. It contains assets to let users set up and configure the tunneling vignette as a comfort mode intended to mitigate motion sickness in VR.
- Added a Tunneling Vignette Controller component used for driving the vignette material included with the Tunneling Vignette sample. Locomotion Provider components can be drag-and-dropped into a list of Locomotion Providers that will trigger the tunneling vignette effect. A custom inspector allows previewing each effect for the corresponding Locomotion Provider.
- Added
ITunnelingVignetteProviderinterface to allow custom behaviors to control the vignette effect. - Added a
LocomotionPhaseenum inLocomotionProviderthat can be used to describe different phases of a locomotion for use with the tunneling vignette. Added code inContinuousMoveProviderBase,ContinuousTurnProviderBase,SnapTurnProviderBase, andTeleportationProviderto compute theirLocomotionPhase. - Added a Delay Time property to the Teleportation Provider and Snap Turn Provider components to support customization of timing for use with fading in the tunneling vignette.
- Added
Changed
- Updated code paths with macro protections around
InputSystemorInput Managerbased code to prevent attempted usage when either one is not active. - Scroll speed when using the ScrollWheel Input System Action is now being divided by 20 pixels per line instead of 120 pixels per line to match the
InputSystemUIInputModulescrolling speed. - Changed
XRSocketInteractorhover mesh pose calculation to only ignore the current pose of the attach transform forXRGrabInteractablewhen Use Dynamic Attach is disabled instead of for all types ofIXRSelectInteractable. - Changed
XRControllerRecorder.recordingfrominternaltopublic.
Fixed
- Fixed
UIInputModuleso pointer clicks set the correct button (left/right/middle) for theEventSystemin thePointerEventData. - Fixed compilation errors on platforms such as Game Core where
ENABLE_VRis not currently defined.