- Home /
Using laser in VR to interact with NGUI UI Input
Hello everyone,
I’m currently working on Unity 2017.1.1f1 for a VR project (SteamVR SDK) and I’m using NGUI 3.11.4 to create a text field with a keyboard. The player can interact with the keyboard, UI and texts with a laser shot directly from the controller.
My problem here is that I can’t place the cursor between the good letters when I click on the text using the laser. I use NGUI "UI Input" and "UI Label". With classic controls, mouse click on text field is well handled for cursor placement but I fail to get the good position where to place the cursor with the laser.
Anyone has already worked on cursor position in text field and with laser in VR ?
Answer by Simon_CMDP · Jan 18, 2018 at 11:03 AM
@Diukrone I'm using SteamVR_LaserPointer script to create the laser. I keep information on hit with a RaycastHit and I alos got the hit point with the collider of the text.
Oh nice! I will check S$$anonymous$$mVR API later. I will inform you later if I to find a solution.
https://vrtoolkit.readme.io/docs/controllertooltips
$$anonymous$$aybe it can help you!
Thank you for your response ! Unfortunately, I'm not using VRT$$anonymous$$ plug-in so I'm not sure this will work for s$$anonymous$$mVR interaction. $$anonymous$$oreover NGUI isn't used in vrtk so I didn't find any information for me. Hope it could help someone else though !
Please, check if it helps:
https://s$$anonymous$$mcommunity.com/app/358720/discussions/0/133256080239302809/