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,sometimes controller is not working. #2029

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); } }); }

talk2saroj commented 5 years ago

Any update on this?

liaxim commented 5 years ago

@talk2saroj I am unable to reproduce so far. The framework is supposed to automatically handle controller disconnecting/connecting. Your code looks good. If you help me reproduce the issue then we can come up with a solution.

liaxim commented 5 years ago

Please reopen with instructions how to reproduce. Thanks.