Closed whebertML closed 7 months ago
@whebertML please provide a brief description to pass on to Unity for interface suggestions
@AMollis @shaynie
The below noted issues are only within XRI versions post 2.3.2 - I happened to have 2.5 at the time I was investigating. This does not impact us currently, please disregard. Though if Unity will be refactoring this, that will be good for future cases potentially.
XRSocketInteractor has direct dependencies on, and calls into, XRGrabInteractable to perform some of the socket features, like snap hovering. Below are links to several places in the code for reference (links from a mirror of Unity UPM packages for convenience). Would be preferable if such features were done via some IXRSocketInteractable interface or similar.
https://github.com/needle-mirror/com.unity.xr.interaction.toolkit/blob/master/Runtime/Interaction/Interactors/XRSocketInteractor.cs#L458-L459 https://github.com/needle-mirror/com.unity.xr.interaction.toolkit/blob/master/Runtime/Interaction/Interactors/XRSocketInteractor.cs#L483-L484 https://github.com/needle-mirror/com.unity.xr.interaction.toolkit/blob/master/Runtime/Interaction/Interactors/XRSocketInteractor.cs#L771-L817
@whebertML please update regarding xri 2.5 vs 2.3
@whebertML please add unit tests for this
When being selected by an XRSocketInteractor, an ObjectManipulator does not move into the socket transform as expected, like an XRGrabInteractable would. This is due to the default manipulation logic for ObjectManipulator, which is to retain the relative pose offset of an interactor's attach transform. So when selected by an XRSocketInteractor, the ObjectManipulator stays where it is instead of moving into the socket.
With the intent to increase MRTK3's compatibility with continuing XRI features, the request is to modify ObjectManipulator's behavior so that it properly observes the XRSocketInteraction selection and moves into the socket transform.
Video demonstrating both current and new behavior with the changes from #567 :
https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/assets/58860572/e79cb0fb-60bb-4549-b457-725df993720e