I only use W and S keys here but as you can see it also moves sideways while rotating.
I am using Photon Fusion here but here is my movement script:
if (networkInputData.movementInput != Vector2.zero)
{
float _targetRotDegrees = Mathf.Atan2(networkInputData.movementInput.x, networkInputData.movementInput.y) * Mathf.Rad2Deg + networkInputData.cameraEulerAngles.y;
float rot = Mathf.SmoothDampAngle(transform.eulerAngles.y, _targetRotDegrees, ref _rotationVelocity, RotationSmoothTime);
transform.rotation = Quaternion.Euler(0.0f, rot, 0.0f);
//Move
Vector3 moveDirection = transform.forward * _speed;
moveDirection.Normalize();
networkCharacterControllerPrototypeCustom.Move(moveDirection);
}
I also checked where the pivot point was but it is in the middle.
Any idea what causes this weird rotation? Thanks!