Search Unity

Resolved Laser Pointer vector incorrectly forward

Discussion in 'VR' started by SamPerCap, Apr 2, 2021.

  1. SamPerCap

    SamPerCap

    Joined:
    Aug 20, 2019
    Posts:
    3
    Hi everyone,

    I have a problem with the Laser Pointer script from Oculus Integration. The ray doesn't point forward as it is supossed and written in the code. I would like a basis ray and line renderer to press a couple of buttons from the distance, the idea is that the user can use either the controllers either the hand gesture tracking but when using hand gesture tracking, the ray points right, so x-axis, instead forward, z-axis.
    Just a note, when using the controllers, the ray points forward.

    Any idea why?

    Thanks in advance

    Edit: I was missunderstanding the forward input and vectorization.
    As the input was Transform.forward, the vectors were using local position so the forward vector was not in relation to the world's axis but local object's axis.
    By using .up instead .forward (And a couple of more adjustments/tricks) I've got a temporal solution
     

    Attached Files:

    Last edited: Apr 5, 2021
  2. clooock

    clooock

    Joined:
    May 23, 2021
    Posts:
    4
    Hi, can I ask you how do solve the problem?
     
  3. SamPerCap

    SamPerCap

    Joined:
    Aug 20, 2019
    Posts:
    3
    Hi clooock,

    Read from "Edit"