Open anonymous2585 opened 6 months ago
@whebertML , @marlenaklein-msft thought there was a conversation about this already, and we decided to hold off until we update min version to XRI 2.5
@AMollis Sounds good. Not sure what our policy is in general on supporting future package version features when we only depend on an earlier version, anyway. But once we make the move to a later version of XRI, sounds reasonable to support.
@whebertML ... sorry maybe the conversation was about holding off with this unity we move to XRI 3.0 .
Either way I'm fine with adding support now (using #if's to handle < 2.5) or waiting until we update MRTK3's min XRI
I guess this can be resurrected with the work going on for XRI3.
@whebertML or @MaxPalmer-UH want to make this change in XRI3 branch?
I added this issue to the things we want to fix before releasing
@AMollis I can take a look I think. When you mention "before releasing", does that mean before the eventual full 4.0.0 release, or before the pre-release? Nevermind, adding to #645 I guess means not preview release? 👍
I'll try to take a look tomorrow, I've had something bump everything else today so it's shifted back.
@whebertML - were you going to take a look, if not I'm happy to.
Hey @MaxPalmer-UH,
I was planning on taking a look, yes, but might not be able to get to it until next week. I had some initial stuff done to address the XRI 2.5+ features back when I implemented the initial compatibility (up till like XRI 2.3.2), but put it on hold when we started the XRI 3 stuff. I can dust it off and see where it is in comparison, probably needs some refactor if not redoing.
Though again, maybe not till next week some time. If you have ideas and/or have something ready, that works too?
We had to get a release out the door last week at the last minute so I'm only back to MRTK today and have prioritised testinfg the pre release. I don't have anything ready as a starting point for this issue, I was just reading up on how the socket support differs from most interactions in that it's typically based around an object interacting with another site/object in the world (the socket site) - not necessarily a controller - e.g. putting an object into or onto another object. I was wondering if there is a suitable scene that contains those types of iinteraction already - maybe docking pens to the whiteboard? If you have somthing that's a starting point, it might be worth going with that.
@AMollis @MaxPalmer-UH
I sent out an email to discuss the main issue I see with trying to add this feature:
XRSocketInteractor is specifically looking for only XRGrabInteractables to hover snap with. So for interactables like MRTK's ObjectManipulator, which isn't derived from XRGrabInteractable, there is no way to officially participate in a hover snap. We can mimic the behavior and appear to hover snap, and perhaps that is sufficient, but the XRSocketInteractor won't know about it and that could potentially lead to issues - like possibly hover snapping to some other XRGabInteractable at the same time.
The way to do this properly would be for Unity to switch to using an interface, like IXRSocketSnapInteractable or whatever for the socket snapping behavior, allowing ObjectManipulator to implement that interface and participate officially. The system also uses XRSocketGrabTransformer, itself also depending directly on XRGrabInteractable, which calculates the transform when socket selected or socket hover snapped. Hopefully that whole system could be converted to using interfaces.
@whebertML you make a good point, being able to implement an interface for the snapping behaviour seems far more attractive a solution to me. Sounds like it's worth checking with Unity again, I'm happy to chase them through my contacts.
That sounds good, @MaxPalmer-UH . Though I am also curious about what the Unity contact @AMollis previously spoke to might have mentioned regarding this specific issue, if there were any plans regarding XRSocketInteractor itself, or if it was just more about XRI 3 upcoming changes in general.
Describe the problem
567 fixed the ObjectManipulator behaviour with Unity XRI
XRSocketInteractor
.In Unity XRI
2.5.0
(mrtk uses2.3.0
by default), parametersHover Socket Snapping
andSocket Scale Mode
were added inXRSocketInteractor
.Right now, the ObjectManipulator behaviour doesn't use these parameters when moving an object in the socket.
Describe the solution you'd like
Add support for this parameter when the installed XRI package is
>= 2.5.0