unity 给物体角度赋值

 transform.localPosition和transform.localScale都是直接赋值三元数,给旋转赋值需要用
  方法一:
  xxx.transform.localEulerAngles = new Vector3 (0.0f,0.0f,0.0f);
  方法二:
   xxx.transform.rotation=Quaternion.Euler(0.0f,0.0f,0.0f);

 

posted on 2020-08-31 14:37  zqiang0803  阅读(1247)  评论(0编辑  收藏  举报

导航