Controller calibration

58 views
Skip to first unread message

Durk Langhout

unread,
Jan 27, 2016, 1:19:17 AM1/27/16
to Hardcode (VR Game)
hello developer(s),

First off great game! Really like the way to control the player.
I am also a game developer and currently developing my very first VR game (Minecraft clone) and was wondering if you could tell me how you did the calibration of the controllers in unity.
I also got 4 buttons in my game but some people can't play my (beta) game because his/her controller isn't supported.

I'm also using unity 3D and programming in C#,
I currently using Input.GetButton(Jump/Fire1/Fire2/Fire3) because I thought those buttons would work for most controllers but I appear to be wrong.

Any help would be greatly appreciated I tried multiple things and can't find anything on the internet as well.

Hope to hear from you soon.
Best Wishes,

Durk Langhout

Mike Farlenkov

unread,
Jan 27, 2016, 4:55:15 AM1/27/16
to Hardcode (VR Game)
Hi!

Different gamepads have different keycodes for same buttons.
So Input.GetButton() is not reliable because it use settings of InputManager which is static.

If you want to support wide range of gampads you have to implement some system with dynamic calibration.

You can start from exploring of InControl plugin for Unity:
http://www.gallantgames.com/pages/incontrol-introduction

InControl tries to solve problem in 2 ways:
1) predefined gamepad profiles
2) dynamic binding of controls

It also have free open source version:
https://github.com/pbhogan/InControl

Goodluck :)

Durk Langhout

unread,
Jan 27, 2016, 6:44:07 AM1/27/16
to Hardcode (VR Game)
Thanks alot ill look into it!

Best wishes,
Durk Langhout

Durk Langhout

unread,
Jan 31, 2016, 10:05:24 AM1/31/16
to Hardcode (VR Game)
Hello again,

Im still having difficulty's getting the incontroll plugin to work.
And right now nothing works and even after deleting the input settings so I would get the standard input from unity again some buttons still don't work.

So I can't continue to develop my game anymore any help would be appriciated!

Could anyone tell me a step by step instruction to set this up?
Because I currently only have a very old working build of my game that I can send but I have added a lot more gameplay since then and I really want my tester to play my newest versions.

Best wishes,
Durk Langhout

Durk Langhout

unread,
Feb 1, 2016, 11:30:44 AM2/1/16
to Hardcode (VR Game)
Edit: standard unity buttons are working again it wasent related to the plugin.
But I still have no clue on how to get started. I was able to get a input controller in the inspector and set the variables for the positive and negative buttons locally but not on runtime

Mike Farlenkov

unread,
Feb 2, 2016, 5:45:22 PM2/2/16
to Hardcode (VR Game)
Sorry, but I can't consult you on using of InControl
I'm not using it, I'm just study it's sources and build my own system "inspired" by it

study sources,
study website http://www.gallantgames.com/pages/incontrol-rebinding-at-runtime
ask questions to developer http://forum.unity3d.com/threads/incontrol-input-and-cross-platform-controller-support-for-unity-made-easy.257619/

Durk Langhout

unread,
Feb 3, 2016, 1:24:41 PM2/3/16
to Hardcode (VR Game)
Wow thanks a lot, that first link made the steps very clear.
Thx again

Durk Langhout

unread,
Feb 5, 2016, 11:25:11 AM2/5/16
to Hardcode (VR Game)
So i finally got the controller calibration done and I'm really happy with that:D
But until now I can only change buttons and not axis.

The way I am doing this now I going trough all kinds of buttons with a for each and if one of those keys is pressed that is the new input button.

But I have no clue on how I can go trough all axis inputs...

Currently using the standard Input.GetAxis horizontal and vertical. But one tester said they can't move around with any joystick on his controller.

I also wanted to implement a feature where you can use a second joystick axis to rotate the player with without having to strain your neck, so people can play my game sitting on a couch or chair that can't rotate.

But for this I will need to be able to read input from the axis the user uses.

Any help would off course be very appriciated!

Best wishes,
Durk Langhout

Reply all
Reply to author
Forward
Message has been deleted
0 new messages