コード例 #1
0
        //calculate strokes for axes
        void axis3Rotate()
        {
            calculateAngel();

            float axisLeft  = BalanceStroke.x - rollStroke / 2 + pitchStroke / 2;
            float axisRight = BalanceStroke.y + rollStroke / 2 + pitchStroke / 2;
            float axisFront = BalanceStroke.z - pitchStroke / 2;

            float axis1Stroke = axisLeft;
            float axis2Stroke = axisRight;
            float axis3Stroke = axisFront;

            if (DebugLogInfo)
            {
                Debug.LogFormat("eulerAngles:{0} | roll:{1} pitch:{2} | left:{3} right:{4} front:{5}", transform.eulerAngles.ToString("f3"), rollStroke, pitchStroke, axis1Stroke, axis2Stroke, axis3Stroke);
            }

            MotionPlatformController.Move(axis2Stroke, axis1Stroke, axis3Stroke, 0, 0);
        }
コード例 #2
0
 //release hardware
 public void OnDestroy()
 {
     MotionPlatformController.ReleaseDevice();
     MotionPlatformController.Release(0, "");
 }
コード例 #3
0
 void Start()
 {
     //init hardware
     MotionPlatformController.Init();
 }