Search Unity

VR 'Laser Pointer' and Worldspace Canvas issues

Discussion in 'AR/VR (XR) Discussion' started by tatea, Mar 1, 2019.

  1. tatea

    tatea

    Joined:
    Sep 1, 2015
    Posts:
    8
    I'm using OVRPointerVisualizer (which isn't officially included in Oculus packages anymore, great) to generate a 'Laser Pointer' via a LineRenderer component used for UI interaction. It all works fine to interact with the canvas but ideally I want it to either collide with the UI Canvas and scale it's length appropriately to stop going 'through' the canvas (which is semi transparent).

    Is there any way to either have this lLinerenderer 'collide' with the canvas and set its 'length' accordingly? or can I have my semi-transparent canvases block the visibility of the LineRenderer for the part that is 'behind' the canvas?

    See image - the darker part of the line is that which is 'behind' the canvas



    Any help much appreciated!
     
  2. InakiAndres

    InakiAndres

    Joined:
    Jan 9, 2019
    Posts:
    19
    try giving the position of the last point of linerenderer the position of the gazepointer, (i think u are using gazepointer)
     
  3. tatea

    tatea

    Joined:
    Sep 1, 2015
    Posts:
    8
    I am not using GazePointer as the latest iteration of GazePointer also does not 'collide' with canvases