Question by
KenanTheFab · Dec 31, 2019 at 06:56 PM ·
inputmousecontrolsjitterfirstpersonshooter
Using new unity input system, camera movement is incredibly jittery.
public void OnRotX(InputAction.CallbackContext context)
{
xRot = context.ReadValue<float>();
transform.Rotate(new Vector3(0, xRot, 0) * rotSpeed * Time.deltaTime);
}
public void OnRotY(InputAction.CallbackContext context)
{
yRot = context.ReadValue<float>();
Eye.transform.Rotate(new Vector3(-yRot, 0, 0) * rotSpeed * Time.deltaTime);
}
My camera view code. Whenever I try to move the camera slowly or quickly with my mouse like a FPS character, it jitters quite a bit, almost snapping place to place at times. (Appears to do this when the game launches too, snapping straight upwards or downwards...)
I've used this code for an older version of the input system and it worked flawlessly, has anything drastically changed? I tried googling but could hardly understand things...
Comment