Search Unity

TextMesh Pro TMP_TextUtilities with Oculus Quest input

Discussion in 'UGUI & TextMesh Pro' started by TheCircadian, Mar 14, 2021.

  1. TheCircadian

    TheCircadian

    Joined:
    Jul 30, 2016
    Posts:
    16
    I am looking to interact with TMPro_Text objects like they do in this video, although instead of a cursor I want to use the LaserPointer of the Oculus Quest VR input system. So far I've tried working with the
    FindIntersectingWord(TMP_Text, Vector3, Camera) method, replacing the `Input.mousePosition` in the Vector3 field with various components of the LaserPointer, including the transform of the hand, as well as the sphere at the end of the LaserPointer. Each time though, the laser pointer always goes through the text as if it isn't there. It hits Button objects just fine, just not these TMPro_Text objects.

    I also have a canvas added to each TMPro_Text object that I'm trying to recognize. Is there something I'm missing in getting the TMPro_Text to be a recognized interactable UI element?