Search Unity

Get axis without using the InputManager

Discussion in 'Scripting' started by WidmerNoel, Apr 27, 2015.

  1. WidmerNoel

    WidmerNoel

    Joined:
    Jun 3, 2014
    Posts:
    66
    Hi there :)

    A lot of people like the InputManager but I cannot see it anymore, it almost makes me sick to be honest. :(
    This is why I am writing a few classes, which handle the Input without the InputManager.
    But I cannot find any way of recieving the values of analogue axes of a controller.
    The sticks and triggers are the hard part.
    Code (CSharp):
    1. Input.GetButton("Jump") // returns the button *configured*in the input manager
    2. Input.Getkey(KeyCode.Space) // returns the keyboard key (*not configured*)
    3. Input.GetAxis("Horizontal") // returns the axis *configured* in the input manager
    4.  
    5. //What I'd like to have:
    6. Input.GetAnalogue(Something) //Something to return *not configured* axes values
    Is there a way of getting these values?
    I mean - why should we be able to get keys but not axes?
    (Doesn't make sense to me)