Search Unity

Input Manager Snap setting for keyboard inputs

Discussion in 'Editor & General Support' started by vinfang, Dec 3, 2013.

  1. vinfang

    vinfang

    Joined:
    Jul 13, 2013
    Posts:
    14
    Using one of the keys that the Input Manager provides for you by default, Horizontal, I wanted to test the snap feature being enabled for horizontal so that if both the left and right buttons are pressed, snap is suppose to kick in and make the axis value for this horizontal key be reset to the neutral state 0. However, my Debug.Log statements show that it stays at either -1 or 1 depending on which key was pressed first, and seems to ignore the second key being pressed.

    Has anyone used this feature successfully or know if I'm using it wrong.

    My goal is so that if both keys of opposite directions are pressed at the same time, the player should stop moving. I've tried fiddling around with the Input Manager settings by enabling/disabling snap for that key but I don't get the matching result the documentation says I should be seeing.