Hi, I’m using the newest input system from unity and have made an Input Action asset which I have added keyboard bindings into it. But for some reason, when I pressed a key (W for example), the system does not recognise it.
Here’s my code
// Start is called before the first frame update
void Start()
{
keyboard = bindings.FindActionMap("Keyboard Bindings", true);
}
// Update is called once per frame
void Update()
{
wPressed = keyboard.FindAction("W").ReadValue<float>();
acceleration = keyboard.FindAction("W").triggered ? 1f : 0f;
acceleration = keyboard.FindAction("S").triggered ? acceleration - 1f : acceleration;
WSMController.AccelerationInput = acceleration;
steering = keyboard.FindAction("A").triggered ? steering - 1f : keyboard.FindAction("D")
.triggered ? steering + 1f : 0f;
WSMController.SteeringInput = steering;
}
Here’s also my bindings
And yes, when the system starts I already checked whether or not the map have been called. Funny thing is, it worked fine using input action from oculus.