Home > Software engineering >  Unity Input system not recognizing WASD without Arrow Keys in config
Unity Input system not recognizing WASD without Arrow Keys in config

Time:09-13

I'm having a problem with the new unity input system, where if I remove the Arrow keys or the WASD keys the whole system for "move" stops working completely. But if I don't do anything, the player moves with both the WASD and Arrow keys, which I don't want.

I've tried following multiple examples on YouTube and nothing works, sometimes the example in the video doesn't work, I'm completely lost with this

Default Input actions config used

Move set up

WASD Set up

Here is the code as I've set it up to try use the Input Actions Script

 private void ReEnabled()
{
    playerControls?.Enable();
}
private void TearDown()
{
    playerControls?.Disable();
}
private void Continues()
{
    moveIncrement = playerControls.Player.Move.ReadValue<Vector3>();
    lookIncrement = VectorMapping.VecterMapFrom2Dto3D(playerControls.Player.Look.ReadValue<Vector2>());
}
private void FixedContinues()
{
    rBody.MovePosition(rBody.position   (MoveSpeed * Time.deltaTime * moveIncrement));
    torsoComponent.Rotate(lookIncrement);
}

what I'm aiming to do it create a control scheme similar to that of The Binding of Isaac, where the WASD are your move controls, and the Arrow keys are shoot/look direction

CodePudding user response:

Cant add a comment but did you try to move Arrow Keys to the fire section and then try to figure out how to use them to shoot without braking move system with awsd?

CodePudding user response:

[Solution][1]

So I mage a hacky hack, it was suggested by a Chris (Not sure how to tag) But essentially the pic explains what I did, dupped the controller and set both direction buttons as the intended button. [1]: https://i.stack.imgur.com/97jjf.png

  • Related