unity怎么导出能旋转的unity 场景整体导出

原点导出FBX到unity - CG工具箱
职业、公司:
城市地区:
上传手持身份证或正面身份证:选择图片
原点导出FBX到unity
可试用&1&天
发布者:snvtkd2005
浏览量:784
任何问题,请在【评价/技术交流】中留言,开发者会在第一时间回复,请尽量自行解决问题,或在【评价/技术交流】中查找答案,把更多时间留给开发者做研发。实在不行请与页面左上角【QQ客服】联系!
一键导出FBX:批量导出单个模型为FBX格式;记录模型的旋转 位置原来的信息到文本;导出时,模型的旋转 位置归为原点导出;导出后,模型旋转位置还原;在unity中根据文本把模型的位置 旋转 还原为max中的位置 旋转使用步骤:1,选择模型后(注意多个模型名字不可重名),点击第一个按钮。会导出模型为fbx文件,文件存放在当前max目录下新建的fbx文件夹下&&&& 同时会在当前max目录下新建 max文件名+“_”+modelPosAndRotation.txt文本文件,里面记录着模型的名称 位置 旋转信息2,开始导入模型到unity。把CG云盘插件内的resetModelFromTxt.cs unity脚本复制到工程Editor文件夹下&&&& 在菜单栏会出现 YJScripts -点击下面的“从文本重置模型位置和旋转”,打开脚本对话框&&& 3,在unity里,先把模型拖入场景。&&&& 把上面生成的modelPosAndRotation.txt文件拖入unity工程,并拖入模型文本一栏。&&&& 点击下面的按钮,场景中的模型就会还原位置旋转为max中的样子。尊敬的游客,告诉您一个秘密,这里隐藏了1张非常重要的演示图,需要您后才可见。
一键导出FBX记录模型信息,在unity中导入
发布时间:
最后更新日期:
开发者信息
程序员,软件开发
请先将工具分享到您的微博,QQ空间等,再抢红包输出Unity的场景文件为Obj模型文件 - CSDN博客
输出Unity的场景文件为Obj模型文件
在Unity中建立的场景文件,摆放的模型可以用下列脚本导出为Obj模型文件,可以保持场景中模型的位置,贴图灯信息.
将脚本命名为ObjExporter.cs,放在项目的Editor目录下,选择你要导出的模型物体(可以有若干子物体),在编辑器菜单中找到Custom的输出选项,能看到三个选项,分别是&输出所有网格到单一的Obj文件&,&输出选择的网格合体到一个Obj文件&,&输出每个选择的模型到单一Obj文件&,一般常用第二项.成功输出后将弹出对话框,模型和关联的贴图将放到项目的根目录的&ExportedObj&文件夹中.
EditorObjExporter.cs脚本:
System.Collections.G
System.IO;
ObjMaterial
&&&&public
&&&&public
string textureN
class EditorObjExporter : ScriptableObject
&&&&private
static int
vertexOffset = 0;
&&&&private
static int
normalOffset = 0;
&&&&private
static int
uvOffset = 0;
&&&&private
static string
targetFolder = &ExportedObj&;
&&&&private
static string
MeshToString(MeshFilter mf, Dictionary&string, ObjMaterial& materialList)
&&&&&&&&Mesh m = mf.sharedM
&&&&&&&&Material[] mats = mf.renderer.sharedM
&&&&&&&&StringBuilder sb =
new StringBuilder();
&&&&&&&&sb.Append(&g &).Append(mf.name).Append(&\n&);
&&&&&&&&foreach(Vector3 lv
in m.vertices)
&&&&&&&&&&&&Vector3 wv = mf.transform.TransformPoint(lv);
&&&&&&&&&&&&
&&&&&&&&&&&&
&&&&&&&&&&&&sb.Append(string.Format(&v {0} {1} {2}\n&,-wv.x,wv.y,wv.z));
&&&&&&&&sb.Append(&\n&);
&&&&&&&&foreach(Vector3 lv
in m.normals)
&&&&&&&&&&&&Vector3 wv = mf.transform.TransformDirection(lv);
&&&&&&&&&&&&sb.Append(string.Format(&vn {0} {1} {2}\n&,-wv.x,wv.y,wv.z));
&&&&&&&&sb.Append(&\n&);
&&&&&&&&foreach(Vector3 v
&&&&&&&&&&&&sb.Append(string.Format(&vt {0} {1}\n&,v.x,v.y));
&&&&&&&&for
material=0; material & m.subMeshC material ++) {
&&&&&&&&&&&&sb.Append(&\n&);
&&&&&&&&&&&&sb.Append(&usemtl &).Append(mats[material].name).Append(&\n&);
&&&&&&&&&&&&sb.Append(&usemap &).Append(mats[material].name).Append(&\n&);
&&&&&&&&&&&&
&&&&&&&&&&&&try
&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&ObjMaterial objMaterial =
new ObjMaterial();
&&&&&&&&&&&&&&&&&&objMaterial.name = mats[material].
&&&&&&&&&&&&&&&&&&if
(mats[material].mainTexture)
&&&&&&&&&&&&&&&&&&&&&&objMaterial.textureName = EditorUtility.GetAssetPath(mats[material].mainTexture);
&&&&&&&&&&&&&&&&&&else
&&&&&&&&&&&&&&&&&&&&&&objMaterial.textureName =
&&&&&&&&&&&&&&&&&&materialList.Add(objMaterial.name, objMaterial);
&&&&&&&&&&&&}
&&&&&&&&&&&&catch
(ArgumentException)
&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&}
&&&&&&&&&&&&int[] triangles = m.GetTriangles(material);
&&&&&&&&&&&&for
i=0;i&triangles.Li+=3)
&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&sb.Append(string.Format(&f {1}/{1}/{1}
{0}/{0}/{0} {2}/{2}/{2}\n&,
&&&&&&&&&&&&&&&&&&&&triangles[i]+1 + vertexOffset, triangles[i+1]+1 + normalOffset, triangles[i+2]+1 + uvOffset));
&&&&&&&&&&&&}
&&&&&&&&vertexOffset += m.vertices.L
&&&&&&&&normalOffset += m.normals.L
&&&&&&&&uvOffset += m.uv.L
&&&&&&&&return
sb.ToString();
&&&&private
static void
&&&&&&&&vertexOffset = 0;
&&&&&&&&normalOffset = 0;
&&&&&&&&uvOffset = 0;
&&&&&&&private
static Dictionary&string, ObjMaterial& PrepareFileWrite()
&&&&&&&&&&&Clear();
&&&&&&&&return
new Dictionary&string, ObjMaterial&();
&&&&&&&private
static void
MaterialsToFile(Dictionary&string, ObjMaterial& materialList,
string folder,
string filename)
&&&&&&&&&&&using
(StreamWriter sw = new
StreamWriter(folder + &/&
+ filename + &.mtl&))
&&&&&&&&&&&&foreach( KeyValuePair&string, ObjMaterial&
kvp in materialList )
&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&sw.Write(&\n&);
&&&&&&&&&&&&&&&&sw.Write(&newmtl {0}\n&, kvp.Key);
&&&&&&&&&&&&&&&&sw.Write(&Ka&&0.6 0.6 0.6\n&);
&&&&&&&&&&&&&&&&sw.Write(&Kd&&0.6 0.6 0.6\n&);
&&&&&&&&&&&&&&&&sw.Write(&Ks&&0.9 0.9 0.9\n&);
&&&&&&&&&&&&&&&&sw.Write(&d&&1.0\n&);
&&&&&&&&&&&&&&&&sw.Write(&Ns&&0.0\n&);
&&&&&&&&&&&&&&&&sw.Write(&illum 2\n&);
&&&&&&&&&&&&&&&&if
(kvp.Value.textureName != null)
&&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&&string
destinationFile = kvp.Value.textureN
&&&&&&&&&&&&&&&&&&&&int
stripIndex = destinationFile.LastIndexOf('/');
&&&&&&&&&&&&&&&&&&&&&&&if
(stripIndex &= 0)
&&&&&&&&&&&&&&&&&&&&&&&&destinationFile = destinationFile.Substring(stripIndex + 1).Trim();
&&&&&&&&&&&&&&&&&&&&string
relativeFile = destinationF
&&&&&&&&&&&&&&&&&&&&destinationFile = folder +
&/& + destinationF
&&&&&&&&&&&&&&&&&&&&Debug.Log(&Copying texture from &
+ kvp.Value.textureName + & to &
+ destinationFile);
&&&&&&&&&&&&&&&&&&&&try
&&&&&&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&&&File.Copy(kvp.Value.textureName, destinationFile);
&&&&&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&&&&&catch
&&&&&&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&&}&&&&
&&&&&&&&&&&&&&&&&&&&sw.Write(&map_Kd {0}&, relativeFile);
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&sw.Write(&\n\n\n&);
&&&&&&&&&&&&}
&&&&private
static void
MeshToFile(MeshFilter mf, string
folder, string
&&&&&&&&Dictionary&string, ObjMaterial& materialList = PrepareFileWrite();
&&&&&&&&using
(StreamWriter sw = new
StreamWriter(folder +&/&
+ filename + &.obj&))
&&&&&&&&&&&&sw.Write(&mtllib ./&
+ filename + &.mtl\n&);
&&&&&&&&&&&&sw.Write(MeshToString(mf, materialList));
&&&&&&&&MaterialsToFile(materialList, folder, filename);
&&&&private
static void
MeshesToFile(MeshFilter[] mf, string
folder, string
&&&&&&&&Dictionary&string, ObjMaterial& materialList = PrepareFileWrite();
&&&&&&&&using
(StreamWriter sw = new
StreamWriter(folder +&/&
+ filename + &.obj&))
&&&&&&&&&&&&sw.Write(&mtllib ./&
+ filename + &.mtl\n&);
&&&&&&&&&&&&for
i = 0; i & mf.L i++)
&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&sw.Write(MeshToString(mf[i], materialList));
&&&&&&&&&&&&}
&&&&&&&&MaterialsToFile(materialList, folder, filename);
&&&&private
static bool
CreateTargetFolder()
&&&&&&&&try
&&&&&&&&&&&&System.IO.Directory.CreateDirectory(targetFolder);
&&&&&&&&catch
&&&&&&&&&&&&EditorUtility.DisplayDialog(&Error!&,
&Failed to create target folder!&,
&&&&&&&&&&&&return
&&&&&&&&return
&&&&[MenuItem (&Custom/Export/Export all MeshFilters in selection to separate OBJs&)]
&&&&static
void ExportSelectionToSeparate()
&&&&&&&&if
(!CreateTargetFolder())
&&&&&&&&&&&&return;
&&&&&&&&Transform[] selection = Selection.GetTransforms(SelectionMode.Editable | SelectionMode.ExcludePrefab);
&&&&&&&&if
(selection.Length == 0)
&&&&&&&&&&&&EditorUtility.DisplayDialog(&No source object selected!&,
&Please select one or more target objects&,
&&&&&&&&&&&&return;
&&&&&&&&int
exportedObjects = 0;
&&&&&&&&&&&for
i = 0; i & selection.L i++)
&&&&&&&&&&&{
&&&&&&&&&&&&&&&Component[] meshfilter = selection[i].GetComponentsInChildren(typeof(MeshFilter));
&&&&&&&&&&&&&&&for
m = 0; m & meshfilter.L m++)
&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&exportedObjects++;
&&&&&&&&&&&&&&&&&&&MeshToFile((MeshFilter)meshfilter[m], targetFolder, selection[i].name +
&_& + i +
&_& + m);
&&&&&&&&&&&&&&&}
&&&&&&&&&&&}
&&&&&&&&&&&if
(exportedObjects & 0)
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects exported&,
&Exported &
+ exportedObjects + & objects&,
&&&&&&&&&&&else
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects not exported&,
&Make sure at least some of your selected objects have mesh filters!&,
&&&&[MenuItem (&Custom/Export/Export whole selection to single OBJ&)]
&&&&static
void ExportWholeSelectionToSingle()
&&&&&&&&if
(!CreateTargetFolder())
&&&&&&&&&&&&return;
&&&&&&&&Transform[] selection = Selection.GetTransforms(SelectionMode.Editable | SelectionMode.ExcludePrefab);
&&&&&&&&if
(selection.Length == 0)
&&&&&&&&&&&&EditorUtility.DisplayDialog(&No source object selected!&,
&Please select one or more target objects&,
&&&&&&&&&&&&return;
&&&&&&&&int
exportedObjects = 0;
&&&&&&&&ArrayList mfList =
new ArrayList();
&&&&&&&&&&&for
i = 0; i & selection.L i++)
&&&&&&&&&&&{
&&&&&&&&&&&&&&&Component[] meshfilter = selection[i].GetComponentsInChildren(typeof(MeshFilter));
&&&&&&&&&&&&&&&for
m = 0; m & meshfilter.L m++)
&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&exportedObjects++;
&&&&&&&&&&&&&&&&&&&mfList.Add(meshfilter[m]);
&&&&&&&&&&&&&&&}
&&&&&&&&&&&}
&&&&&&&&&&&if
(exportedObjects & 0)
&&&&&&&&&&&{
&&&&&&&&&&&&&&&MeshFilter[] mf =
new MeshFilter[mfList.Count];
&&&&&&&&&&&&&&&for
i = 0; i & mfList.C i++)
&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&mf[i] = (MeshFilter)mfList[i];
&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&string
filename = EditorApplication.currentScene + &_&
+ exportedO
&&&&&&&&&&&&&&&int
stripIndex = filename.LastIndexOf('/');
&&&&&&&&&&&&&&&if
(stripIndex &= 0)
&&&&&&&&&&&&&&&&filename = filename.Substring(stripIndex + 1).Trim();
&&&&&&&&&&&&&&&MeshesToFile(mf, targetFolder, filename);
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects exported&,
&Exported &
+ exportedObjects + & objects to &
+ filename, &&);
&&&&&&&&&&&}
&&&&&&&&&&&else
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects not exported&,
&Make sure at least some of your selected objects have mesh filters!&,
&&&&[MenuItem (&Custom/Export/Export each selected to single OBJ&)]
&&&&static
void ExportEachSelectionToSingle()
&&&&&&&&if
(!CreateTargetFolder())
&&&&&&&&&&&&return;
&&&&&&&&Transform[] selection = Selection.GetTransforms(SelectionMode.Editable | SelectionMode.ExcludePrefab);
&&&&&&&&if
(selection.Length == 0)
&&&&&&&&&&&&EditorUtility.DisplayDialog(&No source object selected!&,
&Please select one or more target objects&,
&&&&&&&&&&&&return;
&&&&&&&&int
exportedObjects = 0;
&&&&&&&&&&&for
i = 0; i & selection.L i++)
&&&&&&&&&&&{
&&&&&&&&&&&&&&&Component[] meshfilter = selection[i].GetComponentsInChildren(typeof(MeshFilter));
&&&&&&&&&&&&&&&MeshFilter[] mf =
new MeshFilter[meshfilter.Length];
&&&&&&&&&&&&&&&for
m = 0; m & meshfilter.L m++)
&&&&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&&&&exportedObjects++;
&&&&&&&&&&&&&&&&&&&mf[m] = (MeshFilter)meshfilter[m];
&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&MeshesToFile(mf, targetFolder, selection[i].name +
&_& + i);
&&&&&&&&&&&}
&&&&&&&&&&&if
(exportedObjects & 0)
&&&&&&&&&&&{
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects exported&,
&Exported &
+ exportedObjects + & objects&,
&&&&&&&&&&&}
&&&&&&&&&&&else
&&&&&&&&&&&&&&&EditorUtility.DisplayDialog(&Objects not exported&,
&Make sure at least some of your selected objects have mesh filters!&,
本文已收录于以下专栏:
相关文章推荐
Unity运行时,动态创建的Mesh挂载到MeshFilter组件上,并不能保存到本地Prefab文件里。在运行的场景里,拖拽正确配置的MeshFilter对象到Unity资源管理器。生成的Prefa...
using System.Collections.G
using System.IO;
using System.T
using UnityEngin...
本文好多内容,来自互联网。
环境:unity3d 4.1,
unity3d中写脚本实现模型的颜色变化和旋转,注意如果模型设置为static是旋转不了的。
功能描述:鼠标落到模型,模型颜色变化,按下鼠标...
我在Uniyt 3D中创建的真实地形想保存为模型以备以后使用,经过在网上艰辛的搜索(呵呵。。。),终于找到一个方法,经过实验验证,绝对真实可靠!有图有真相!
先上代码(O(∩_∩)O哈哈~)。
这个脚本由 CocoaChina 版主“四角钱” 分享,可以导出 Unity 的网格资源为模型文件。原理是利用 bjExporter.MeshToString() 创建一个文本字符串构成的 Obj 文...
如何在Unity 3D中生成真实的地形?这里为你解决这一问题!!
将Unity场景以Wavefront Obj格式导出
需求当美术同事拼接好场景内容后,需要在指定场景上制作具体的行走面时,用来提供网格参照。主要代码逻辑就是将场景内带Mesh的结点记录下来,通过对应的.obj数据格式进行保存。具体代码:using Uni...
我在Uniyt 3D中创建的真实地形想保存为模型以备以后使用,经过在网上艰辛的搜索(呵呵。。。),终于找到一个方法,经过实验验证,绝对真实可靠!有图有真相!
先上代码(O(∩_∩)O哈哈~)。
...
基于物理的渲染已经提出好多年了,但在游戏中使用的渲染模型仍然是拼凑出来的经验公式(比如Phong)。这些拼凑的模型如果要渲染高质量的图像,就需要繁复地调参数。而基于物理的、保能量的渲染模型可以很容易地...
他的最新文章
讲师:宋宝华
讲师:何宇健
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)unity 鼠标左键 按下 拖动场景,右键旋转场景
问一下运行unity,1、想实现鼠标左键按下,然后拖动鼠标向左移动,使场景也向左移动,该怎么写脚本?2、实现鼠标右键按下,然后拖动鼠标移动,使场景旋转,该怎么写脚本?&这里是我研究的鼠标滚轮转动拉近场景的脚本:void update{distance=0;distance= Input.GetAxis(&Mouse ScrollWheel&)*wheelS//获取鼠标中建响应&transform.position = transform.position+transform.rotation * Vector3(0.0, 0.0, distance);}将这个函数放到摄像机对象的脚本中即可。&&
要评论请先&或者&
移动的应该是摄像机吧。。
:移动的应该是摄像机吧。。 ( 14:53) 代码上是移动摄像机,效果上看起来是移动的场景
鼠标滚轴滚动,实现场景拉近拉远&& &private Vector3 PreMouseMP&& &private Vector3 PreMouseLP&& &private float wheelSpeed=5.0f;&& & & & & & & & &void Update () {&& & & &//鼠标滚轴按下,移动摄像头&& & & &if(Input.GetMouseButton(1))&& & & &{&& & & & & &&& & & & & &if (PreMouseMPos.x&=0)&& & & & & &{ & & & & & & & &&& & & & & & & &PreMouseMPos =new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f); & & & & & & & &&& & & & & &}&& & & & & &else&& & & & & &{&& & & & & & & &Vector3 CurMouseMPos=new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f);&& & & & & & & &Vector3 offset=CurMouseMPos-PreMouseMP&& & & & & & & &offset=-offset*0.5f;&& & & & & & & &transform.Translate(offset);&& & & & & & & &PreMouseMPos=CurMouseMP & & & & & & & &&& & & & & &} & & & & & & && & & &}&& & & &else&& & & &{ & & & &&& & & & & &PreMouseMPos=new Vector3(0.0f,0.0f,0.0f);&& & & &}}
void Update () {&& & & & & & & & & & & & & & & & & & //鼠标左键按下,旋转摄像头&& & & &if(Input.GetMouseButton(0))&& & & &{&& & & & & &if (PreMouseLPos.x&=0)&& & & & & &{&& & & & & & & &PreMouseLPos =new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f);&& & & & & &}&& & & & & &else&& & & & & &{&& & & & & & & &Vector3 CurMouseLPos=new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f);&& & & & & & & &Vector3 offset=CurMouseLPos-PreMouseLP & & & & & & & &&& & & & & & & &Quaternion tt=Quaternion.Euler(offset);&& & & & & & & &transform.Rotate(new Vector3(tt.y*20.0f,-tt.x*20.0f,tt.z*20.0f)); && & & & & & & &PreMouseLPos=CurMouseLP & & & & & & & &&& & & & & &} & & & & & & && & & &}&& & & &else&& & & &{&& & & & & &PreMouseLPos=new Vector3(0.0f,0.0f,0.0f);&& & & &}}&该功能有缺点,本来是想只改变摄像头旋转角度的x和y值,但该代码实际上,z值也会变化。谁知道如何使z值不变,请指点一下。当旋转角度的x,y和z都是0时,transform.Rotate(new Vector3(0,5,0));可以保证摄像头绕y轴旋转,z始终为0,但当x不为0时, transform.Rotate(new Vector3(0,5,0));摄像头绕y轴旋转时,z也会变化,导致视角看起来是倾斜的。
:void Update () {
//鼠标左键按下, .. ( 16:00) && &public float minimumY = -60F;&& &public float maximumY = 60F;&& &float rotationY = 0F;//鼠标左键按下,旋转摄像头&& & & &if(Input.GetMouseButton(0))&& & & &{&& & & & & &if (PreMouseLPos.x&=0)&& & & & & &{&& & & & & & & &PreMouseLPos =new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f);&& & & & & &}&& & & & & &else&& & & & & &{&& & & & & & & &Vector3 CurMouseLPos=new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.0f); & & & & & & & &&& & & & & & & &Vector3 offset=CurMouseLPos-PreMouseLP & & & & & & && & & & & & & & && & & & & & & &Quaternion tt=Quaternion.Euler(offset);&& & & & & & & &float rotationX = transform.localEulerAngles.y -tt.x*20;&& & & & & & & &rotationY += tt.y*20;&& & & & & & & &rotationY = Mathf.Clamp(rotationY, minimumY, maximumY);&& & & & & & & &transform.localEulerAngles = new Vector3(rotationY, rotationX, 0); & & & & & & &&& & & & & & & &PreMouseLPos=CurMouseLP & & & & & & & &&& & & & & &} & & & & & & && & & &}&& & & &else&& & & &{&& & & & & &PreMouseLPos=new Vector3(0.0f,0.0f,0.0f);&& & & &}&& & & &
请问有中键平移场景的代码吗
:请问有中键平移场景的代码吗 ( 23:19) 3楼的代码应该就是你要的
没搞清楚,你左键按下, 视角不是应该平移么。右键按下,旋转模型。 &那你的视角应该是怎么样的? 是从上往下看的,还是像CS那样的在里边走。 基本上,如果按下左键平移,那么只要判断鼠标是上下左右移动,来进行前后左右的移动。按下右键。 如果是俯视, 那么就以模型为中心, Transform.RotateAround &旋转就好。 如果你要以镜头视角中心为旋转中心, 打条射线,获得中心点。 &再转。
谢谢分享。学习了,回去看看效果。君,已阅读到文档的结尾了呢~~
Unity3D技术之导出游戏场景详解,unity 导出场景,unity导出安卓,unity导出android工程,unity导出apk,unity导出exe,unity导出fbx,unity 导出 html5,unity导出ios,unity导出eclipse工程
扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
Unity3D技术之导出游戏场景详解
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer--144.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口

我要回帖

更多关于 unity导出apk不能安装 的文章

 

随机推荐