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 ?

Are you also using Ray pointer?

@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.