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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Get reference to PokePointer

Discussion in 'VR' started by Mr_Jigs, Aug 30, 2019.

  1. Mr_Jigs

    Mr_Jigs

    Joined:
    Apr 18, 2015
    Posts:
    69
    Using MRTK2 how do I get a reference to the currently active PokePointer(s) in order to change the fingertip visualization (FingerCursor prefab) at the moment of touching? The current solid white circle at the moment and during touch is obscuring details behind the circle. My first approach would be to disable the meshrenderer on the IndexFingerRing. But I am currently at a loss as how to get a reference to that item.

    Cheers
     
    Last edited: Aug 30, 2019
  2. Mr_Jigs

    Mr_Jigs

    Joined:
    Apr 18, 2015
    Posts:
    69
    As usual the answer revealed itself within moments after posing the question. More or less by accident I discovered where the run time objects are being instantiated: below the MixedRealityPlayspace in case you're wondering. Knowing that; I added a tag to the IndexFingerRing part of the prefab which allowed me to find it and it's MeshRenderer component. Switching it off is the easy solution but I also discovered that I could have set the thickness of the ring to zero through the use of MaterialPropertyBlocks. Live and learn!

    :)
     
    JasonCostanza likes this.
  3. JasonCostanza

    JasonCostanza

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    400
    Glad you found a way, I'll have to take note of that solution myself :)