Input.GetAxis("Mouse X") always return 0, using normal settings
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MouseLook : MonoBehaviour
{
float horizontalSpeed = 2.0f;
float verticalSpeed = 2.0f;
void Update()
{
// Get the mouse delta. This is not in the range -1...1
float h = horizontalSpeed * Input.GetAxis("Mouse X");
float v = verticalSpeed * Input.GetAxis("Mouse Y");
print(h + ", " + v);
transform.Rotate(v, h, 0);
}
}
as you see, it is just a normal Mouselook script, however, the print value is always 0, 0 and the camera wont move, I've check the code and find out the Mouse X and Y are returning 0. I've search up the internet and not yet finding a solution. Help me pls ;-;
Answer by lll4louis · Sep 21, 2021 at 08:45 PM
I found a fix using the new input system. It didn't work as there was no "control schemes". Simply setup the schemes and use the input system can fix the problem (there are tons of tutorials about using input system). 
Your answer
Follow this Question
Related Questions
Why isn't my basic input script working? 0 Answers
i put space under jump in the input manager "not working" 0 Answers
Do I need to use the Input Manager to register all input axes? 0 Answers
Xbox360 Trigger Axis not recognized 0 Answers
Input Manager - prevent keyboard keys mapping to Xbox controller buttons 1 Answer