Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
LePython's avatar
LePython
Explorer
2 years ago

Meta XR Interaction SDK v60 data from pointer event is null

Hi,

After updating to interaction sdk v60, I get an error when trying to obtain a collision like so:

public void OnPointerMove(PointerEvent pointerEvent){
        if(!rayInteractableEvent.enabled) return;
        RayInteractor handRayInteractor = pointerEvent.Data as RayInteractor;
        if (!handRayInteractor.CollisionInfo.HasValue) {
            return;
        }

 

handRayInteractor is null and undefined the compiler says. I haven't changed anything in my code, just updated the sdk. In release notes it says that a case where 'data' could be null was fixed, but I now have the exact same problem. Has the way of getting data changed or am I missing something else from this update?