LocalJoost / BlogComments

This repo is solely used for comments on https://localjoost.github.io/
4 stars 0 forks source link

Comments on "MRTK2 to MRTK3 - intercepting a raw 'air tap' like with IMixedRealityPointerHandler" #421

Open LocalJoost opened 2 years ago

LocalJoost commented 2 years ago

Original article: https://localjoost.github.io/MRTK2-to-MRTK3-intercepting-a-raw-air-tap-like-with-IMixedRealityPointerHandler/

Zee2 commented 1 year ago

@LocalJoost , for this raw "air tap" functionality there's actually a drastically easier way to do this! Just add an InputActionReference to a MonoBehavior and drag in the Select input action from our input action assset.

It's just a raw Input System thing, no need to futz with the XRI abstractions (controller, etc) if you don't want to.

LocalJoost commented 1 year ago

Thank you. I will check this out. I had the feeling this should be a lot easier. Unfortunately, there isn't much samples of 'how to do stuff' so I wrote this article hoping someone would come out of the woods telling me how it should be done.

And someone just did 😉

Zee2 commented 1 year ago

Yeah, docs still leave a lot to be desired for sure. The other thing is that the answer to a lot of questions of "how do you do xyz in MRTK3?" is generally "you do it the usual Unity Input System/XRI/Canvas/etc way!", which is kind of hard to explain in a docs site. We try and point folks to the existing docs of all the Unity systems we rely on, but we definitely still have a long way to go to make it totally comprehensive.

By the way, huge thanks for writing these posts! The reason I even found this is because your blog came up as a handy resource during our MRTK team Q&A session we held early this morning. We pointed some community folks your way as you're one of the earliest adopters in terms of dealing with migration, etc.

Thanks a TON for taking the leap so early and giving us great feedback, advice, etc. We all really appreciate it! Feel free to reach out directly anytime with any questions.

LocalJoost commented 1 year ago

"you do it the usual Unity Input System/XRI/Canvas/etc way!" Yeah... this is not especially helpful as a lot of developers in this space don't always come from a Unity background (like me) so "the usual Unity way" is not always apparent. Also, the Unity documentation leaves... lots to be desired, to put it mildly, especially when it comes to samples. In addition, I have seen "the usual Unity way" too often lead to a horrendous tightly coupled behaviour-spaghetti all over the scene which becomes almost impossible to maintain or properly test over time. I am typically building long running business apps, with a robust architecture. Not a game ;)

So this is why I write samples. Lots of them. Sometimes even in a roundabout way, but they always work ;)

LocalJoost commented 1 year ago

@Zee2 After a little poking around on the internet I found out what you exactly mean and how that should be done. I wrote a little something about it with a bit of tongue-in-cheek humor. I hope you appreciate that. If you don't like that, please let me know https://localjoost.github.io/MRTK2-to-MRTK3-a-MUCH-SIMPLER-way-to-intercept-a-raw-air-tap-like-with-IMixedRealityPointerHandler/

dahaideyu commented 8 months ago

@LocalJoost , for this raw "air tap" functionality there's actually a drastically easier way to do this! Just add an InputActionReference to a MonoBehavior and drag in the Select input action from our input action assset.

It's just a raw Input System thing, no need to futz with the XRI abstractions (controller, etc) if you don't want to.

@Zee2 through your way ,Could I get poke point (position xyz) ? could you give me a sample ?@

LocalJoost commented 8 months ago

@dahaideyu I am well aware of that and blogged about it https://localjoost.github.io/MRTK2-to-MRTK3-a-MUCH-SIMPLER-way-to-intercept-a-raw-air-tap-like-with-IMixedRealityPointerHandler/ However my method is cross platform https://localjoost.github.io/Intercepting-raw-air-taps-with-MRTK3-cross-platform-(Quest-2-and-HoloLens)/ so I have continued using it

dahaideyu commented 8 months ago

@dahaideyu I am well aware of that and blogged about it https://localjoost.github.io/MRTK2-to-MRTK3-a-MUCH-SIMPLER-way-to-intercept-a-raw-air-tap-like-with-IMixedRealityPointerHandler/ However my method is cross platform https://localjoost.github.io/Intercepting-raw-air-taps-with-MRTK3-cross-platform-(Quest-2-and-HoloLens)/ so I have continued using it

hi @LocalJoost first thank you , I want to get click point in MRTK3,but I don't , Could you give me a sample ? use simple method get click position in HoloLens2, (touch point and air tap point )

LocalJoost commented 8 months ago

@dahaideyu here you are! https://localjoost.github.io/Getting-raw-air-taps-and-their-positions-with-MRTK3/