Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Oculus VR Pointer has laser duplicate / lag (Laserpointer.cs and OVRPointerVisualizer.cs)

Discussion in 'VR' started by Ebonicus, May 2, 2023.

  1. Ebonicus


    Oct 31, 2016
    I have a hierarchy as follows:

    Ship(fast moving) > Camera Rig >Controllers
    I have a UI menu that pops up and when enabled I display the controllers, cursor and laser pointer.

    The controllers have zero lag and appear fine.
    However the cursor and the laser pointers have a lag issue when moving and opening up the menu.

    There are two versions being rendered. One is in the correct position (tip of controller) and another is lagged behind, as if it is lerping from ships last location a 60 frames ago.

    I have tried both OVRPointerVIsualizer.cs and LaserPointer.cs which come in the Oculus intergration package.
    Tested each separately. They both do the same thing, both of these scripts have only 1 line of code to place the start and end points of the line renderer, of which there is only 1 in the scene.

    I have tested the linerendered placement code in Update/LateUpdate/FixedUpdate.
    No matter when it is done, the line rendered is in two places when the player camera rig has been in motion.

    Also, for the cursor, I am getting the same lag, LaserPointer.cs places the cursor as well, and it has the same lag/lerp issue.

    Here is a vid of the issue.
    First it shows opening up UI when player is not in motion, and all is fine.
    Then you can see there are 2 lasers rendered, and one is lerping into position.
    For the cursor there is only one, and it is the wrong one that is lerping.

    If anyone has solved this, or has suggestions, I would appreciate it, thanks.