zoukankan      html  css  js  c++  java
  • 桁架系统控制

    桁架系统模拟

    //键盘控制
    void ControllerObjectByKeyBoard()
    {
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.W))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = armRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            armRootTransform.position = arm_postion + new Vector3(0, 0, 0.01f);
        }
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.S))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = armRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            armRootTransform.position = arm_postion + new Vector3(0, 0, -0.01f);
        }
    
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.A))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = hookRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            hookRootTransform.position = arm_postion + new Vector3(0.01f,0, 0);
        }
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.F))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = hookRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            hookRootTransform.position = arm_postion + new Vector3(-0.01f,0, 0);
        }
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.G))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = hookRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            hookRootTransform.position = arm_postion + new Vector3(0, 0.01f, 0);
        }
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.H))
        {
            // 获取Player变量指定的对象的三围坐标
            Vector3 arm_postion = hookRootTransform.position;
            // 获取X,Y,Z值
            float x = arm_postion.x;
            float y = arm_postion.y;
            float z = arm_postion.z;
    
            //armObject.transform.Translate();
            hookRootTransform.position = arm_postion + new Vector3(0, -0.01f, 0);
        }
    
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.R))
        {
            // 获取Player变量指定的对象的三围坐标
            Quaternion arm_rotation = hookHeaderTransform.rotation;
            float y = arm_rotation.y;
            ////Debug.Log(y);
            float y_f = y + 0.0f;
            hookHeaderTransform.Rotate(new Vector3(0, y_f, 0));
    
        }
    
    
        if (Input.GetKey(KeyCode.LeftShift) && Input.GetKey(KeyCode.T))
        {
            // 获取Player变量指定的对象的三围坐标
            Quaternion arm_rotation = hookHeaderTransform.rotation;
            float y = arm_rotation.y;
            ////Debug.Log(y);
            float y_f = (y + 0.0f)*(-1.0f);
            hookHeaderTransform.Rotate(new Vector3(0, y_f, 0));
    
        }
    
    
    
    }

     

    ######################

    QQ 3087438119
  • 相关阅读:
    python的input获取用户输入
    pyinstaller打包成功的.exe,本机运行正常,在别的电脑上运行报错Failed to execute script ...
    Shell应用:批量将文件编码由gbk转utf8
    不伤眼睛的文字背景色 豆沙绿RGB值为(199,237,204)
    javascript禁用backspace回退,shift+backspace前进,F5等刷新页面功能
    crontab实行shell乱码问题解决
    linux C 函数大全 .
    Web服务器:shell字符串处理
    Linux C编程一站式学习 .
    crontab中date的用法
  • 原文地址:https://www.cnblogs.com/herd/p/15325292.html
Copyright © 2011-2022 走看看