Closed talk2saroj closed 5 years ago
Any update on this?
@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.
Please reopen with instructions how to reproduce. Thanks.
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); } }); }