Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

In Lenovo Daydream devices,controller is getting disconnected sometime. #2030

Closed talk2saroj closed 5 years ago

talk2saroj commented 5 years ago

In Lenovo Daydream devices, sometimes controller is not working. Is there any way to get some call back whenever the controller is detached, so that we can connect it back. Currently, I am initializing the cursor controller only once inside OnInit() method of GVRMain class using the following code.

public void initCursorController() { mainScene.getEventReceiver().addListener(mTouchHandler); GVRInputManager inputManager = context.getInputManager(); inputManager.selectController(new GVRInputManager.ICursorControllerSelectListener() { public void onCursorControllerSelected(GVRCursorController newController, GVRCursorController oldController) { if (oldController != null) { oldController.removePickEventListener(mTouchHandler); } mCursorController = newController; newController.addPickEventListener(mTouchHandler); newController.setCursor(createCursor()); newController.setCursorDepth(-CURSOR_DEPTH); newController.setCursorControl(GVRCursorController.CursorControl.PROJECT_CURSOR_ON_SURFACE); } }); }

liaxim commented 5 years ago

Closing as a duplicate of https://github.com/Samsung/GearVRf/issues/2029