Can I add gaze control feature like youtube in Android VR view without using Unity?
Asked Answered
A

1

8

I am making a VR video player using google VR SDK for android. I want to have gaze control in my VR player to add media pause and play controls in the player. I know we can achieve this using unity but I need to do this using android or java code. Is there any way to implement it in native android code without using unity.

Arabian answered 3/2, 2017 at 13:2 Comment(0)
P
1

Yes, you can, but you will need to calculate if the user is gazing at the buttons yourself. Google has provided an example Android VR project that does this here. Take a look at the isLookingAtObject() method at the very bottom of the linked file. You can apply this to buttons whose position you have in world space, instead of a cube target like in the demo.

However since you are just making a video player where neither the camera nor the buttons move, you could just hard-code the angles at which you are looking at certain buttons, and if the camera rotation is within a threshold of a given button's viewing angle then you know you are gazing at the button.

Postglacial answered 21/3, 2017 at 16:24 Comment(1)
Thanks for the info @MBorsch, Will something their to work for iOS gaze as well without Unity ??Maleate

© 2022 - 2024 — McMap. All rights reserved.