I’m still getting used to Unity 6 and am suddenly struggling to get mouse look for a first person controller working.
The look action is set to a Value Action Type, Vector2 Control Type.
I made a 4 direction composite action and assigned all the mouse delta movements.
The code (which is very basic atm) is the following:
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerLook : MonoBehaviour
{
[SerializeField]
Transform cameraPivot;
[SerializeField]
float sensitivity, x, y;
[SerializeField]
private InputActionReference look;
Vector2 lookInput;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
lookInput = look.action.ReadValue<Vector2>();
lookInput *= Time.deltaTime * sensitivity;
x = lookInput.x;
y = lookInput.y;
transform.Rotate(0, lookInput.x, 0);
}
}
Its not even registering the inputs.
And I have dropped the action into the inspector. There are no error codes.
Lastly, I’m noticing that Unity6 no longer centers and hides mouse when its playing, is that something that might cause the issue?
I’m sorry I’m struggling with something so simple and stupid, but any help is greatly appretiated.