Example #1
0
 void JoyKeyboard(bool yLocked = true)
 {
     if (yLocked)
     {
         joyMove = ControllerHub.GetControllerJoy("JoyArea").GetAxisRelated(camTransform);
     }
     else
     {
         joyMove = ControllerHub.GetControllerJoy("JoyArea").GetAxisRelated(camTransform, parallelToGroundLine: false);
     }
 }
Example #2
0
    void FixedUpdate()
    {
        if (_camera != null)
        {
            joyMove = ControllerHub.GetControllerJoy("JoyArea").GetAxisRelated(_camera.transform);
            Debug.DrawRay(_transform.position, joyMove * 3, Color.red);
        }
        else
        {
            Debug.LogError("no camera attached to script " + this);
        }

        //cc.Move(new Vector3(joyMove.x,0,joyMove.y)*10*Time.fixedDeltaTime);
        cc.Move(joyMove * 10 * Time.fixedDeltaTime);
    }
Example #3
0
    private void Update()
    {
        //******************** show  how to Controllers values for your code
        // Joy Values
        JoyAxisRaw            = ControllerHub.GetControllerJoy("JoyArea").GetAxis(); // .GetAxis("Raw");
        JoyAxisNormalized     = ControllerHub.GetControllerJoy("JoyArea").GetAxis("Normalized");
        JoyAxisWalkRun        = ControllerHub.GetControllerJoy("JoyArea").GetAxis("WalkRun");
        JoyAxisFourDirections = ControllerHub.GetControllerJoy("JoyArea").GetAxis("Four");

        JoyTouched = ControllerHub.GetControllerJoy("JoyArea").GetControllerInTouch();

        // Joy Values
        //Joy1AxisRaw = ControllerHub.GetControllerJoy("JoyArea (1)").GetAxis(); // .GetAxis("Raw");
        //Joy1Touched = ControllerHub.GetControllerJoy("JoyArea (1)").GetControllerInTouch();
        // Touch Values
        TouchAxis    = ControllerHub.GetControllerTouch("TouchArea").GetAxis();
        TouchTouched = ControllerHub.GetControllerTouch("TouchArea").GetControllerInTouch();
    }