码迷,mamicode.com
首页 > 编程语言 > 详细

Unity 之 transform

时间:2017-04-04 15:00:40      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:transform   unity   .com   pwa   span   单位   relative   cond   void   

transform.Translate

1、function Translate (translation : Vector3, relativeTo : Space = Space.Self) : void)

Move the object forward along its z axis 1 unit/second.
//沿着z轴1单位/秒,向前移动物体
transform.Translate(Vector3.forward * Time.deltaTime);
// Move the object upward in world space 1 unit/second.
//在世界坐标沿着y轴1单位/秒,向上移动物体
transform.Translate(Vector3.up * Time.deltaTime, Space.World);

Unity 之 transform

标签:transform   unity   .com   pwa   span   单位   relative   cond   void   

原文地址:http://www.cnblogs.com/zmztya/p/6664978.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!