I have this code for rotating the player and camera and when I build the game the rotation is faster.
I guess that’s because of the Time.deltatime but when I don’t multiply the values with the deltatime I get a slower rotation with the controller in the build (although the _rotationVelocity value is the same in the build and the editor)
Here is the code:
private void HandleRotation()
{
float scalingFactor = Time.deltaTime;
Vector2 mouseDelta = inputManager.inputActions.Player.CameraRotation.ReadValue<Vector2>();
_cinemachineTargetPitch += -mouseDelta.y * cameraSensitivity * scalingFactor;
_rotationVelocity = mouseDelta.x * cameraSensitivity * scalingFactor;
// clamp our pitch rotation
_cinemachineTargetPitch = ClampAngle(_cinemachineTargetPitch, -maxXRotation, maxXRotation);
// Update Cinemachine camera target pitch
cameraTransform.localRotation = Quaternion.Euler(_cinemachineTargetPitch, 0f, 0f);
// rotate the player left and right
playerTransform.Rotate(Vector3.up * _rotationVelocity);
}