Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit
Other
1.1k stars 360 forks source link

XR Ray Interactor doesn't collide with Default-based geo #16

Open Godatplay opened 4 years ago

Godatplay commented 4 years ago

The ray interactor seems to be going through all the geometry I have with (mesh) colliders in the Default layer. Override Line Length is unchecked in XR Interactor Line Visual.

I expect the end of the line to collide with non-Ignore Raycast layers, especially Default and not pass through it. The gradient would also adjust accordingly, giving the user a visual indication the line has shortened in case they can't see whether or not the line is passing through.

Unity 2019.3.0f5, XRIT 0.9.2

iTubeGamer commented 3 years ago

I think I have the same problem. While the XR Interactor Line Visual (the line which the user sees) stops at the first Interactable, the line of the XR Ray Interactor seems to go through all of these Interactables. The onHoverEntered Event gets triggered for all the Interactables, which are behind the Interactable i am currently hovering on. I'd like to display a text label for the object, which the user is currently hovering on. But like this, the labels for the objects behind get displayed aswell...

Am I missing something?

alex-calderwood commented 3 years ago

@iTubeGamer @Godatplay

Did you ever figure this out?

Godatplay commented 3 years ago

Never figured it out, no. I used this for a prototype for a client because the interaction was simply teleporting to preset locations. It was really low budget, so having a few bugs - and as of 0.9.2 it was definitely buggy! - was ok. My experience with that version did not make me very interested in using it again, but hopefully it has improved noticeably.

IMO interaction frameworks are great if your interaction design follows the strict constraints of the framework. But I've since realized that the interaction design I'm most interested in is that which does not fit within these constraints, so therefore I should usually just roll my own interaction code. I've been working on a project for a couple years where we did that, and I'm really grateful. I haven't used another framework since because I've moved to this project full-time, so unfortunately I can't give more advice on that.

alex-calderwood commented 3 years ago

That s really good advice. I understand the math of ray casting and the like, but I didn’t want to reinvent the wheel especially if this code has been optimized to death, but at the end of the day the kind of interaction I’m attempting is pretty basic, so I shouldn’t be intimidated. Thanks for the wisdom.

On Fri, Jul 2, 2021 at 5:39 PM Godatplay @.***> wrote:

Never figured it out, no. I used this for a prototype for a client because the interaction was simply teleporting to preset locations. It was really low budget, so having a few bugs - and as of 0.9.2 it was definitely buggy!

  • was ok. My experience with that version did not make me very interested in using it again, but hopefully it has improved noticeably.

IMO interaction frameworks are great if your interaction design follows the strict constraints of the framework. But I've since realized that the interaction design I'm most interested in is that which does not fit within these constraints, so therefore I should usually just roll my own interaction code. I've been working on a project for a couple years where we did that, and I'm really grateful. I haven't used another framework since because I've moved to this project full-time, so unfortunately I can't give more advice on that.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples/issues/16#issuecomment-873288326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAKHPUWNMLD3VM6S2L3Z5TTVY5YNANCNFSM4KMJA76Q .

-- M.S. Computer Science Columbia University