cancel
Showing results for 
Search instead for 
Did you mean: 

How do I detect Gear VR inputs in React VR scene?

gdebojyoti
Explorer
I am trying to create a web app using React VR and run it using Samsung Gear VR.    

I could not see the default white dot (VR pointer) while in VR mode in my scene. Consequently methods such as "onInput" and "onClick" are not working. The same methods work quite fine if I view the same scene outside VR mode - even using the browser provided in Gear VR.

Am I missing something? How do I access those methods while in VR mode in Gear VR?

Example code that works fine in normal web browser (including the one in Gear VR), but not when I have turned on VR mode.

<Text
    style={{
        // backgroundColor: '#777879',
        fontSize: 0.2,
        transform: [{translate: [0, 0, -5]}],
        color: this.state.textColor
    }}
    onEnter={() => this.setState({textColor: 'gold'})}
    onExit={() => this.setState({textColor: 'white'})}>
    This text will turn gold when you look at it.
</Text>

1 REPLY 1

gdebojyoti
Explorer
Thank you. I look forward to hearing more. In the meanwhile, I shall also be keeping an eye on the Oculus docs.