I am working on a project about text editing in VR (specifically on Google Cardboard).
I want to use a gaze to replace mouse position, and a one-button controller to replace mouse’s left click to do selection in VR.
In normal case (PC with a mouse), we can click on the input field by mouse and the caret will place on the clicked position in the input field.
How can I perform the same in the Google Cardboard with a gaze, and a one-button controller?
Currently, I have tryInputField.OnPointerEnter, OnPointerClick, OnPointerEnter, but those cannot change the caret position.
Thank you.
2 Likes
I’m having the same issue. I wrote a custom VRInputModule. Everything works: clicking, pressing, dragging.
In the InputField, dragging the selection works. Kinda. It always starts from the beginning of the text.
But clicking into the InputField and setting the caretposition does not work.
1 Like
Hello Friends!
Please tell me did you find a solution?
We are doing the same thing now in the project! We are trying to find a solution to this issue. But so far to no avail… Maybe you can help us?
As it is a long time ago project, I didn’t remember the details.
In the end, I didn’t solve the problem with the input field.
But I have done similar things by using a normal text component (maybe worked fine with the input field, as the input field component contains the text object). As I am working on Chinese texts, all the words are having the same width and height. So, I can know the exact word pointing by the targeting position on UI divided by the line-height and word width.