I’m currently playing around with the XR Screen Space Controller, trying to implement desktop/touch controls for my XR app. Since depth interactions are difficult in 2D, I want to implement some sort of automatic snapping for interactables, if they are held in front of a socket interactor. (Hovering over the socket in screen space, not 3D space). I think, setting the attachTransform position to the correct distance should do the trick.
My current approach is to create a custom RayInteractor (deriving from XRRayInteractor) and read the raycast in the ProcessInteractor method override. The Problem is, that since all the public methods (TryGetCurrentRaycast, TryGetCurrent3DRaycastHit and TryGetCurrent2DRaycastHit) only return the first hit, I’m not able to check if there is also a XRSocketInteractor getting hit. Also, GetValidTargets only returns Interactables, no Interactors like the XRSocketInteractor.
Does anyone have an idea, how I could approach this problem without casting my own raycast manually?
I’m currently using XRIT v2.5.4
Thanks a lot!