v1.0-rc6 - Adjust axis rest position on input rebind


There are some things that shouldn't be an issue in this day and age anymore... Yet, here I am writing about how inputs still suck.

A long time ago, I wrote about how Unity sucks at doing reconfigurable controls and I ended up doing my own input manager on top of Unity's tools (see v0.3's devlog). Well, turns out I did it wrong.

Back when I first implemented my input manager, I assumed that Unity would always map an axis resting position to 0.0f, and would register values in the range [-1.0f, 1.0f]. In hindsight, that sounds somewhat silly... but an engine could sample a controller's axes for a few frames and detect the resting value (you know, like most, if not all, N64 games used to do back in the day). Yesterday, I learned that this isn't the case, and some controllers may rest some of its axes at 0.5f, and Unity will simply report it as being half-way pressed. This had the terrible side effect that trying to rebind any input would cause it to be assigned to that axis.

So, I again I had to change that and manually detect the resting position for a controller's axes. However, instead of doing that when the game boots (because I'm lazy, and because I don't think I would have any way to know how many controllers are even connected), this is calculated whenever the inputs are rebound.

To be fair, I may have done something wrong when configuring all 8 or so possible gamepads... But I also feel like this shouldn't even have been an issue anymore.

Anyway, it's fixed and that's all that matters.

Changelog

  • Adjust axis rest position on input rebind

Files

mystery-tower-linux64.zip 24 MB
Version v1.0-rc6 Dec 11, 2020
mystery-tower-win32.zip 21 MB
Version v1.0-rc6 Dec 11, 2020
mystery-tower-win64.zip 24 MB
Version v1.0-rc6 Dec 11, 2020

Get Mystery Tower

Leave a comment

Log in with itch.io to leave a comment.