// Fixed update is called in sync with physics
    private void FixedUpdate()
    {
        // read inputs
        h = CrossPlatformInputManager.GetAxis("Horizontal");
        v = CrossPlatformInputManager.GetAxis("Vertical");
        bool crouch = Input.GetKey(KeyCode.C);

        if ((h < -offsetCross || h > offsetCross || v < -offsetCross || v > offsetCross) && aim)
        {
            cameraFunctions.WiggleCrosshairAndCamera(weaponManager.ActiveWeapon, false);
        }
        lookPos = lookInCameraDirection && m_Cam != null ? transform.position + m_Cam.forward * 100 : transform.position + transform.forward * 100;

        if (!aim)
        {
            // calculate move direction to pass to character
            if (m_Cam != null)
            {
                // calculate camera relative direction to move:
                m_CamForward = Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized;
                m_Move       = v * m_CamForward + h * m_Cam.right;
            }
            else
            {
                // we use world-relative directions in the case of no main camera
                m_Move = v * Vector3.forward + h * Vector3.right;
            }
#if !MOBILE_INPUT
            // walk speed multiplier
            if (Input.GetKey(KeyCode.LeftShift))
            {
                m_Move *= 0.5f;
            }
#endif

            // pass all parameters to the character control script
            m_Character.Move(m_Move, crouch, m_Jump, aim, lookPos);
            m_Jump = false;
        }
        else
        {
            m_Move = Vector3.zero;
            Vector3 dir = lookPos - transform.position;
            dir.y = 0;
            transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(dir), 20 * Time.deltaTime);
            m_CharacterAim.ChangeMovementScript(h, v, Vector3.Scale(m_Cam.forward, new Vector3(1, 0, 1)).normalized, m_Cam.right, a_wanttorun);
            m_Jump = false;
            //anim.SetFloat("Forward", v);
            //anim.SetFloat("Turn", h);
        }
    }