Search Unity

Question Rotate XRRayInteractor for better Index comfort

Discussion in 'VR' started by ArtIsEverything, Apr 12, 2021.

  1. ArtIsEverything

    ArtIsEverything

    Joined:
    Jan 13, 2021
    Posts:
    4
    Hi everyone,

    I'm currently developing a project for the Valve Index, and the knuckles controllers. I have teleportation movement working fine, but it is really annoying to have to bend your entire hand down to get the raycast to go to any reasonable spot. This happens because the ray fires out of the top of the controller, rather than out of the index finger of the controller, like it does in Half Life Alyx. I'm wondering if there is a way to rotate the angle of the raycast coming out of the hand to determine teleport and interaction to be at a more perpendicular angle than a parallel one, as this would massively improve the ease of play.

    I'm using OpenXR and the basic XRRayInteractor.

    I'm very new to Unity, so if there is a really obvious answer, just lemme know but please be nice about it
     
  2. ArtIsEverything

    ArtIsEverything

    Joined:
    Jan 13, 2021
    Posts:
    4
  3. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Try using the
    pointerPosition
    and
    pointerRotation
    instead of
    devicePosition
    and
    deviceRotation
    when binding the actions.