摘要:
在Unity3d中获取游戏对象有三种方法:一:获取对象1.通过对象名称获取:objCube=GameObject.Find("Cube");private var objCube:GameObject;private var isCubeRoate=false;function Start () { objCube=GameObject.Find("Cube");}function Update(){ if(isCubeRoate){ objCube.transform.Rotate(0.0f,Time.deltaTime*200,0.0f); }}fu 阅读全文
摘要:
A Product by Mixed Dimensions What is BooleanRT? BooleanRT is a real-time 3D boolean operations extension for Unity that allows you from executing 3D Boolean operations (Union, Intersection, Substract) during runtime or during level creation and editing in the editor’s sceneview. What does it off... 阅读全文
摘要:
var Mid : Texture2D; var mouse : Texture2D; //鼠标图片 var mousePs = Vector2.zero; //鼠标的位置 private var angle : float; function Update () { mousePs = Input.mousePosition;//获取鼠标位置 angle = 180 - Mathf.Atan2(mousePs.x - 250, Screen.height -mousePs.y - 250) * Mathf.Rad2Deg;//计算选择角度 } function OnGUI () { S... 阅读全文
摘要:
Unity的系统单位为米,其他3D软件的模型导入,而保持和Unity的比例一致是非常重要的,下面对各软件进行测试:㈠. 3dsmax 转 Unity的比例为100:1;也就是说Unity单位是3dsmax的100倍。看下图,设置为100米的情况下,导入到Untiy才等于1米。㈡. Maya转Unity的比例为0.01:1;也就是说Maya的单位是Unity的100倍。如下图设置测试,Maya中的1厘米,导入到Unity等于1米。㈢. Lightwave模型导入到Unity的转换比为100:1,和3dsmax的一样。如下图,100米等于Unity的1米。㈣. CINEMA 4D 模型导入到Uni 阅读全文