Esempio n. 1
0
    // Use this to get a normalized translation vector in the x & z plane
    public static Vector3 GetNormalizedTranslation()
    {
        Motus_1_MovementVector local = _vector;

        local.Normalize();
        Vector3 rtn = new Vector3(local.LateralComponent, 0f, local.VerticalComponent);

        rtn = _inGameOffset * rtn;

        if (rtn.magnitude != 0)
        {
            if (!_isMoving)
            {
                _movingStateChange = true;
                _isMoving          = true;
            }
        }
        else
        {
            if (_isMoving)
            {
                _movingStateChange = true;
                _isMoving          = false;
            }
        }

        return(rtn);
    }
Esempio n. 2
0
 // Update is called once per frame
 public static void Update()
 {
     Motus1.Service();
     _vector   = Motus1.GetMotionVector();
     _platform = Motus1.GetRawPlatformData();
 }