Forum Discussion
omtron
9 years agoProtege
How do I get transform of index finger tip?
In Unity I'm trying to add a laser appear out of index finger when player points, but I can't figure out how to select the tip of the index finger. Is transform.Find("hands:b_l_index_ignore") the only way? Because in that case I have to SetActive(true) on all children, do the Find, then SetActive(false) on all children again. I guess would work, but there has to be a better way that I missed?
- Create a public or a serialized variable for it in a script and drag the transform to the slot in the property inspector.
- Solution:
I added this to the end of AddAvatarComponent() in OvrAvatar.cs:try{middleFingerTip = GameObject.Find("hands:b_r_middle_ignore").transform;} catch{return;}
6 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionThis should be in the Unity section of the Developer forum. I'll move the thread.
- omtronProtege
cybereality said:
This should be in the Unity section of the Developer forum. I'll move the thread.
Thanks for moving the thread for me... Any idea on how I would get the Transform of tip of the index finger? - ToukokuuProtegeCreate a public or a serialized variable for it in a script and drag the transform to the slot in the property inspector.
- omtronProtegeSolution:
I added this to the end of AddAvatarComponent() in OvrAvatar.cs:try{middleFingerTip = GameObject.Find("hands:b_r_middle_ignore").transform;} catch{return;} - pjennessRising StarHiya
I had the same issue finding the hand joint, and yeah I manually traversed the heirarchy to get it (I knew it was 3 steps so it was fine.) For some reason the find didnt work for me. (maybe its that setActive step you mention)
-P
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 8 years ago