# InvalidOperationException: Cannot read value of type 'float' from a control with value type 'Vector2'.

- **ID:** `unity/input-system-float-parameter-invalid`
- **Domain:** unity
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The Input System action is bound to a control that outputs a Vector2 (e.g., a joystick), but the code tries to read it as a single float, causing a type mismatch.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Unity 2022.3.12f1 | active | — | — |
| Unity 2023.2.0b1 | active | — | — |
| Input System 1.7.0 | active | — | — |

## Workarounds

1. **Change the action's expected value type to match the control. For a Vector2 control, read the value as `Vector2` using `action.ReadValue<Vector2>()`. For example: `Vector2 move = playerInput.actions["Move"].ReadValue<Vector2>();`.** (95% success)
   ```
   Change the action's expected value type to match the control. For a Vector2 control, read the value as `Vector2` using `action.ReadValue<Vector2>()`. For example: `Vector2 move = playerInput.actions["Move"].ReadValue<Vector2>();`.
   ```
2. **If only one axis is needed, bind the action to a single-axis control (e.g., Keyboard key or button) instead of a Vector2 stick, and read as `float`.** (85% success)
   ```
   If only one axis is needed, bind the action to a single-axis control (e.g., Keyboard key or button) instead of a Vector2 stick, and read as `float`.
   ```
3. **Use `action.ReadValue<float>()` only for actions bound to controls that output a single float, such as an Axis control. Verify the binding in the Input Action Asset editor.** (80% success)
   ```
   Use `action.ReadValue<float>()` only for actions bound to controls that output a single float, such as an Axis control. Verify the binding in the Input Action Asset editor.
   ```

## Dead Ends

- **** — Changing the action type to 'Pass Through' without adjusting the control binding may still result in type mismatch if the control output type is incompatible. (60% fail)
- **** — Disabling and re-enabling the action map does not resolve the fundamental type mismatch between the expected value type and the control's output. (90% fail)
