- Home /
Question by
GoodArcade · Sep 30, 2021 at 07:00 AM ·
inputactionbinding
How can I detect when a binding is pressed in the new input system?
public void Movement(InputAction.CallbackContext context)
{
inputMovement = context.ReadValue<Vector2>();
}
I am simply assigning this Vector2 to a character's movement. But when I press UP and DOWN, for example, it returns a value of 0, as it is combining 1 and -1. This results in the character stopping when I press opposite directions at the same time.
How can I detect when an item from the list circled (image below) is being pressed? Thanks for your time.
help.png
(10.2 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613043634im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unbinding in game settings 1 Answer
Input System - Filtering by Control Type or Scheme 1 Answer
How to consume input when automatically switching control schemes through a Player Input Component 0 Answers
,How Do get Touch input to work with the Player Input Component 1 Answer
How to reference New InputSystem Input Values in C# Script? 1 Answer