Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRTK_UIPointer bug: Raycast only registering with the farthest canvas behind other canvases #1609

Closed
octopusjuice opened this issue Nov 14, 2017 · 3 comments

Comments

@octopusjuice
Copy link

octopusjuice commented Nov 14, 2017

Environment

  • Source of VRTK: Unity Asset Store
  • Version of VRTK: 3.2.1
  • Version of Unity3D: 2017.1.1f1
  • Hardware used: Vive
  • SDK used: SteamVR

Steps to reproduce

  • Open example scene 034
  • Add a world space canvas to the scene and add a VRTK_UICanvas component to it
  • Set the canvas width and height to 500, scale the Canvas to 0.001 on the x and y axes, and position it in the scene
  • Add an image to the canvas, name it "red", color it red, and stretch it to fill the canvas
  • Duplicate the canvas, rename its image "green" and color it green
  • Position the green canvas behind the red canvas

Expected behavior

Pointing a VRTK_UIPointer at the red image should log PointerEnter events for the red image even if the green canvas is behind it and in the path of the ray.

Current behavior

Pointing a VRTK_UIPointer at the red image with the green canvas behind it (and also in the path of the ray) only logs PointerEnter events for the green image.

See screenshot below:

vrtk_uipointer issue

@octopusjuice octopusjuice changed the title VRTK_UIPointer VRTK_UIPointer bug Nov 14, 2017
@thestonefox
Copy link
Member

Can you update the issue title to something that explains the issue so when people are searching the issues they can have an understanding of the problem without needing to read the issue text.

@octopusjuice octopusjuice changed the title VRTK_UIPointer bug VRTK_UIPointer bug: Raycast only colliding with the farthest canvas behind other canvases Nov 14, 2017
@octopusjuice octopusjuice changed the title VRTK_UIPointer bug: Raycast only colliding with the farthest canvas behind other canvases VRTK_UIPointer bug: Raycast only registering with the farthest canvas behind other canvases Nov 14, 2017
@thestonefox
Copy link
Member

Have you tried turning on Blocking Objects = All on the canvas Graphics Raycaster that is appearing behind the other one otherwise it won't consider anything to be blocking it.

@octopusjuice
Copy link
Author

Wow, that was the issue! I wasn't familiar with how the Graphic Raycaster worked. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants