Modify OVRPointerVisualizer to only be visible when colliding with selectable objects
I don't really understand how OVRInputModule is handling the raycasts, but I just want the pointer to appear when I'm pointing at what I want to interact with.
I feel like I should be able to do something like the following, but I'm not getting anything happening. I'm sure what I should be exactly searching for in , but it seems like something that should be more commonplace.
I feel like I should be able to do something like the following, but I'm not getting anything happening. I'm sure what I should be exactly searching for in , but it seems like something that should be more commonplace.
void Update() {
activeController = OVRInputHelpers.GetControllerForButton( OVRInput.Button.PrimaryIndexTrigger, activeController);
Ray selectionRay = OVRInputHelpers.GetSelectionRay( activeController, trackingSpace);
RaycastHit hit;
if (Physics.Raycast(selectionRay, out hit))
{
print("hit");
}
//if(selectionRay)
SetPointerVisibility();
SetPointer(selectionRay);
}