roadofred吧 关注:5贴子:1,343


IP属地:广东1楼2017-09-12 08:17回复
    要在model的inspector中调出animation,就吧rig中type设为legacy,下面是store in root(new
    要调出animator,就把type换为generic


    IP属地:广东2楼2017-09-12 08:19
    回复
      为什么需要time.deltatime
      http://blog.csdn.net/wdjhzw/article/details/73433658?locationNum=7&fps=1


      IP属地:广东3楼2017-09-12 10:30
      回复
        survivor shooter
        question:fixedupdate中targetCamPos = target.position + offset,但是这两者想加不正是camera的位置吗
        void Start()
        {
        offset = transform.position - target.position;
        }
        void FixedUpdate()
        {
        Vector3 targetCamPos = target.position + offset;
        transform.position = Vector3.Lerp (transform.position, targetCamPos, smothing);
        }


        IP属地:广东4楼2017-09-12 10:36
        回复
          error:animationevent has no function name specified
          本错误不影响程序运行,错误原因是在某个model的animation ->events下面添加了多余的event
          删掉即可


          IP属地:广东5楼2017-09-14 21:30
          回复
            不能将text component添加给prefabs预制件


            6楼2017-09-23 20:58
            回复

              用gui 做输入框的时候,遇到了不能编辑的问题
              去google了guilayout.textfield not editable
              找到了答案
              name = GUILayout.TextField(name);
              这行代码里,不要把name在ongui里面声明,要在函数外声明
              附答案:Store the input variables as a member of your class/script, not the method. Each frame you reset it back to an empty string wiping out what the user was trying to input.


              7楼2017-09-25 13:27
              回复
                getcomponent<rigidbody>().velocity,这个几乎是即按即动,松手就停
                .addforce是添加一个力,第一个参数同上,第二个参数是设置力的模式,默认的类似于accelaration,force,剩下的impulse,velocitychange都太快了。


                8楼2017-09-25 13:46
                回复
                  新版本的albedo smothness代替了书中版本的diffuse


                  9楼2017-09-25 19:55
                  回复
                    如果在vs里引用unity的库,使用input.getaxis,是不是能把值记录下来?


                    10楼2017-09-26 20:18
                    回复
                      看到p80,目前的问题 thirdCam keeps raising,still move when i press a/d;


                      11楼2017-09-26 20:43
                      回复
                        解决了第一个问题,不是摄像机上升,是人物下降,player的component里有character controller,它虽然没有 use gravity的选项,但是默认开启了,要让人物不往下掉,放一个plane或者terrain在下面即可


                        12楼2017-09-26 21:09
                        回复
                          看到第82面,还有一个问题,不能跳


                          13楼2017-09-26 21:34
                          回复
                            因为源码版本过低的问题,第六章又很难继续下去了
                            遗留的问题:
                            1.现在人物只能往前运动,不能往后,要怎么做到往后?(回去观察一下虐杀原形的人物的移动
                            2.人物现在还不能跳,不知道是脚本还是动画设置的问题
                            还有没看的,ik,反向动力学
                            图书馆借到的书,很多还是比较老旧的,说真的,还是要好好利用官网的教程。
                            当然书也可以看。


                            14楼2017-09-27 10:58
                            回复
                              做链条关节hinge joint遇到的问题:首先,链条链接起来的物体并不会摆动。
                              然后,对最低端的物体施加一个力,如果稍大,链条就会断开,但是无论大或小,只会往一边动,不会摆回来


                              15楼2017-09-27 20:21
                              回复