aestheticinteractive / Hover-UI-Kit

Create beautiful user interfaces for immersive VR/AR experiences.
Other
792 stars 162 forks source link

Look Cursor Goes to Hovercast local space. How to get back to World Space? #61

Closed imyjimmy closed 7 years ago

imyjimmy commented 7 years ago

Hi Zach, I'm using Hover's Look cursor and the Hovercast Interface Module which is attached to my left hand. When I activate Hovercast and look at its general direction, the Look cursor jumps into Hovercast's local space. How do I get the look cursor back in world space when I de-activate Hovercast?

Thanks,

Jimmy

zachkinstner commented 7 years ago

It looks like you found a bug. When searching for the best item, the "Look" cursor's raycast currently does not consider the active/inactive state of an item.

For an immediate workaround, pelase try this: at line 77 of HoverItemsRaycastManager, you can add a new condition to the if statement:

if ( !item.isActiveAndEnabled || item.IsHighlightPreventedViaAnyDisplay() ) {
    continue;
}

I ran a quick test with this change, and it seems to resolve the issue. In the test, I had a Hovercast menu with a separate item placed behind it. Upon deactivating the Hovercast object, the "Look" cursor now jumps onto the other item's plane/space. And upon re-activating Hovercast, the "Look" cursor returns to the Hovercast plane/space as expected.

imyjimmy commented 7 years ago

Thanks! Just saw this. Closing