playMaker

Author Topic: getting first person controls to work with Moga Hero Power gamepad  (Read 2232 times)

dckrantz

  • Playmaker Newbie
  • *
  • Posts: 3
Hi y'all, new to Unity and scripting and Playmaker and have been banging my head against a wall for days and days trying to solve this problem so I am hoping someone can help!

I've got a project with Unity's FPSController asset moving around a simple plane using my keyboard. I want to be able to control FPSController and its movement and jump button with my Moga Hero Power gamepad. I have InControl set up in my project, along with Playmaker's InControl package imported, but I'm totally at a loss for what to do from here.

Here's a link to the MogaHeroPowerAndroidProfile with its input mappings: https://gist.github.com/ChrisNZL/af7413c54fc7e7e45e71

If anyone could clearly walk me through what to do (and why), I would be forever grateful! Thanks  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: getting first person controls to work with Moga Hero Power gamepad
« Reply #1 on: October 15, 2015, 09:46:32 AM »
Hi,

 it's likely a problem of Incontrol setup, the playmaker actions only get the result of InControl.

I would ask the contributor to provide a working scene or something, just to verify that a regular scene works, and then you try to hook up on that scene to catch the same input. That's how I proceed myself when troubleshooting and I am not sure where the issue is, you need to rule out PlayMaker first.

 Bye,

 Jean

dckrantz

  • Playmaker Newbie
  • *
  • Posts: 3
Re: getting first person controls to work with Moga Hero Power gamepad
« Reply #2 on: October 15, 2015, 05:42:26 PM »
Hi Jean, thanks for responding. :) I understand what you're saying, but as I noted in my OP, my problem is that I don't know how to proceed after InControl and Playmaker are set up in the scene.

Assuming InControl is setup properly, what am I supposed to do and why?

I have read the InControl documentation but as someone with little background in C# or javascript I don't fully understand how it works.

dckrantz

  • Playmaker Newbie
  • *
  • Posts: 3
Re: getting first person controls to work with Moga Hero Power gamepad
« Reply #3 on: October 15, 2015, 08:10:18 PM »
I figured out the problem. The CrossPlatformInputManager was set up to take input from a virtual controller and not an actual controller. I opened the file called CrossPlatformInputManager
and commented out
#if MOBILE_INPUT
           activeInput = s_TouchInput;
#else
           activeInput = s_HardwareInput;
#endif

and replaced it with

activeInput = s_HardwareInput;

Now my controls work, except for the right stick.