I'm not a programmer & use Playmaker to make my games, I get by every now & then by programming Playmaker actions & I've managed to program a OUYA button action for my game. It works really well.
Anyway I've been trying all day to get the Axis controls working and I can't seem to get it working. I've been using various examples with no joy. Can someone point me in the direction of some code I can use that gets the X & Y Axis of the joystick & stores them in floats? Thanks
Hmm thanks, but I don't know how videos of animating a cube between 2 points is going to help with my OUYA Axis playmaker action? I figured you could take a look at my script and maybe spot something that I've missed regarding reading the input from the OUYA controller?
Yeah I realize it's simplistic but it's to refresh my cobwebs. Since in the scripting I was using PlayMaker actions and maybe looking at the source for the interpolation actions would show the methods that need to be implemented.
Can you give me a line of code that would bring the X & Y value of an OUYA joystick to two float values please? Along with any other lines i'd need to add in awake or where ever to make it work, then I can make the playmaker action?
I just have the one OUYA controller. The script is attached to my player object in the scene & I did use the OUYA input settings. I'm on Unity v4 & was only getting72 inputs mapped like what was mentioned in the other post so I updated the input settings to the full 121 but that didn't make a difference.
What I'm doing now is starting a project from scratch that should just show the X & Y values on screen using the same above code. I think it might be something in my existing game... I'll post back with the results
That's what it was! UseLegacyInput was on. The joysticks are now working however my button mapping is different so I'll have to go in there and change that.
Comments
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
Get OUYA Axis Playmaker Action
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
Unity PlayMaker Cube Interpolated Between Two Points - Part I
Unity PlayMaker Cube Interpolated Between Two Points - Part II
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
Thanks
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
public float XAxis = 0f;
public float YAxis = 0f;
void Update (){
XAxis = OuyaExampleCommon.GetAxis("LX", OuyaSDK.OuyaPlayer.player1);
YAxis = OuyaExampleCommon.GetAxis("LY", OuyaSDK.OuyaPlayer.player1);
}
void FixedUpdate (){
OuyaExampleCommon.UpdateJoysticks();
}
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
using UnityEngine;
using System.Collections;
public class OUYA_Drone_Controls : MonoBehaviour {
public float J1XAxis = 0f;
public float J1YAxis = 0f;
public float J2XAxis = 0f;
public float J2YAxis = 0f;
private void Start()
{
Input.ResetInputAxes();
}
void Update () {
J1XAxis = OuyaExampleCommon.GetAxis("LX", OuyaExampleCommon.Player);
J1YAxis = OuyaExampleCommon.GetAxis("LY", OuyaExampleCommon.Player);
J2XAxis = OuyaExampleCommon.GetAxis("RX", OuyaExampleCommon.Player);
J2YAxis = OuyaExampleCommon.GetAxis("RY", OuyaExampleCommon.Player);
}
void FixedUpdate () {
OuyaExampleCommon.UpdateJoysticks();
}
}
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
What I'm doing now is starting a project from scratch that should just show the X & Y values on screen using the same above code. I think it might be something in my existing game... I'll post back with the results
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
Thanks Tim