Implementing VR Controller "Trigger" Events [Fixed]


#1

Hiya,

I’m tinkering around with the Tip Jar script and noticed that the mouse events work fine, but I get no response from my Touch controllers when Trigger selecting the scripted object. In looking over the API, I see that the mouse events are well documented & clearly explain that they won’t work for controller events. The documentation doesn’t, however, shed any light on where one might find information on controller events. The example scripts I’ve seen make use of calls to “startNearTrigger” and “startFarTrigger”, neither of which are mentioned in the API that I can find and neither of which seem to produce any responses from my attempts to actually trigger them in-world. I know that quite a few things DO in fact respond to the Touch controller triggers, so I’m a bit baffled as to both why this isn’t functioning for me and more importantly why such an integral part of HF isn’t documented. I could understand if it were something niche-case, but this is fundamental interaction we’re talking about. Surely I’ve just missed something or gone about something wrong, right?! If so, please enlighten me!

Thanks!!!

  • KpR²

#2

For startNearTrigger etc. see https://docs.highfidelity.com/api-reference/namespaces/controller under the heading, “Entity Methods”.


#3

Fantastic, thanks so much @ctrlaltdavid! I had a feeling it was in there someplace, but the Search feature only brought up results for “A Lesson In Shortbow” and “Create Fireworks”. I’m guessing it’s not actually searching the API proper, but the tutorials instead. Whatever the case, I really appreciate you pointing me in the right direction!


#4

I’ve reported a bug that the API content isn’t included in the Docs site search.


#5

Ever so kind of you @ctrlaltdavid. Thanks again! I’m off to tinker around and see if I can convince my controller to actually fire off these events in HF. Wish me luck! :smiley:


#6

Well, I feel like a right ass now. It looks like all I really needed was to make the silly objects Triggerable. It would probably be a good idea for me not to try experimenting with such things after being awake for so long, lol. Thanks again for the assistance & for the bug report!


#7

Not to belabor the issue (and believe me, I am ever, ever so grateful for the hard work you guys are doing!!!), but I’ve noticed this come up in a few places recently where I can interact with the mouse but not the controller. Now that I know what it was that I was doing wrong myself, I wonder if others aren’t having the same problem and have to ask, is there reason we have to specify Triggerable on the object if we’ve already done so in scripting? There is no “Clickable”, for instance, it’s just handled via script, right?. In any case, it tripped me up & I thought I’d mention it. Keep up the fantastic work & forgive my earlier grumbling. This is simply meant as feedback and not a critique. You folks rock! \m/ :smiley: \m/