Transform - Functions

来源:互联网 发布:java微信商城 编辑:程序博客网 时间:2024/05/20 20:57
Functions 
Translate (translation : Vector3, relativeTo : Space=Space.Self) : void   平移物体,space可以是Self和World,这个不用说了吧 
Rotate (eulerAngles : Vector3, relativeTo : Space = Space.Self) : void  绕欧拉角度的向量旋转 
RotateAround (point : Vector3, axis :Vector3, angle : float) : void  点point按axis的轴旋转angle度 
LookAt (target : Transform, worldUp :Vector3 ) : void 让这个物体的z轴面向target物体 
TransformDirection (direction : Vector3) : Vector3  将direction从本地坐标转换为世界坐标 
InverseTransformDirection (direction : Vector3): Vector3  将derection从世界坐标转换为本地坐标 
TransformPoint (position :Vector3): Vector3  同理 
InverseTransformPoint (position : Vector3) : Vector3 
DetachChildren () : void    解除所有子对象 
Find (name : string) : Transform   按名字寻找并返回子对象 
IsChildOf (parent : Transform) : bool   看他是不是别人的子对象 

原创粉丝点击