Hey Chris.
I'm finally building Bolt Riley for OUYA .
First, I'm using a script that's a little improvement over Tim Grapumann's script that's currently available.
Feel free to take it and integrate the changes I've made into AC.
1. the mouse moves instead of snaps into where the stick is.
2. the cursor cycle didn't work properly. now it does. (using the mouse button 1 simulation)
i have some issues -
3. the MENU button doesn't open the main menu as it should (i.e. simulating Escape)
4. if i manually open the menu button through clicking it, the input code doesn't work and the cursor doesn't move with the left stick axis that simulates the mouse.
ideally , when a menu is on, the left stick axis should cycle between the menu items and not move the cursor at all, but right now, it doesn't do either. maybe there's some missing functionality calling the OuyaIntgration class when a menu is on?
Oded
Comments
So far as navigating menus goes, AC only has a very basic keypress-navigation for menus when Input method is set to Keyboard Or Controller. I believe it's a different story for Unity UI, however, which has it's own system for navigating elements from inputs. Have a try - it could be that the existing OUYA code already integrates well with Unity UI, so long as the EventSystem is set up correctly.
if (OuyaIntegration.GetButtonDown (menu.toggleKey))
It's opening the menu!
now the question is how to get the menu items to react to the controller. I guess first step might be redoing the menu in Unity UI and finding out where in the code you chech for controller input and make it also react to controller when in mouse and keyboard mode?
can you point me in the right direction?
if (playerInput.InputGetButtonDown (menu.toggleKey))
and it does work. i don't remember why it didn't work previously but now it does.
The mouse position is read from the PlayerInput's InputMousePosition function, and this includes the Ouya code. Your game's Input method must be set to Mouse And Keyboard, though.
The priority here is to get mouse movement working with menus. And this wasn't working before you edited OuyaIntegration either? I can't understand why it wouldn't work if it was working when menus weren't on - the same code is used.
this screwes up the controller interface with OUYA (and i suspect also when using a controller control optoin in AC - i didn't check)