Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: everycolorfades on July 24, 2018, 02:38:38 PM

Title: Clean way to turn get axis into a bool? [SOLVED]
Post by: everycolorfades on July 24, 2018, 02:38:38 PM
I'm making a 3d sidescroller so I'd like to have get axis register more as get button down, where it's either on or off, however I like that get axis seems more universal without having to mess around with key codes from multiple controllers.

The issue I'm having is the multiplier, it takes a second or two for the axis to reach it's full amount so when the right key (or whatever direction) is no longer pressed it will take a second before my character stops running.

So even if I turn the value into a bool, say if >.1=on, the multiplier will still go all the way up to 1, which is fine until the key is no longer pressed and the 'cool down' period starts.
Any ideas?
Title: Re: Clean way to turn get axis into a bool?
Post by: jeanfabre on July 25, 2018, 03:52:32 AM
Hi,

 you need to tweak the Input setting for them axis, it;'s inside the Input manager of Unity that you can remove any latency and your axis is going to have no easing.

https://docs.unity3d.com/Manual/class-InputManager.html

else, compare the axis value against 0 with a very small threshold, and that will do too, as soon as the axis is not zero, you raise a bool to true.


Bye,

 Jean
Title: Re: Clean way to turn get axis into a bool?
Post by: djaydino on July 25, 2018, 07:54:24 AM
Hi.
Inside the input manager you need to set the 'Gravity' and the 'Sensitivity' to a high number.

Also you can use the action 'Axis Event' if you use them as a on/off state or 'Axis Event Extended' (on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181))
Title: Re: Clean way to turn get axis into a bool?
Post by: everycolorfades on July 25, 2018, 06:10:09 PM
Thanks guys, that was exactly what I needed.  ;)