漫游
来源:互联网 发布:mhp3数据库下载 编辑:程序博客网 时间:2024/04/27 11:12
现在要做的事情是人在场景中漫游,碰到障碍物时,不能前行。碰到楼梯要爬。
就这么简单的东西,貌似很常见的功能,我搞了好几天了,好像不太容易实现。开始拼命了!
How to make a simple first person walkthrough
Here's how you can make a simple first person walk-through with your own artwork:
- Import your level. See here on how to import geometry from your art package into Unity.
- Select the imported model file and enable Generate Colliders in the Import Settings in the Inspector.
- Locate the in the Project View and drag it into the Scene View.
- Make sure that the scale of your level is correct. The First Person Controller is exactly 2 meters high, so if your level doesn't fit the size of the controller, you should adjust the scale of the level size within your modeling application. Getting scale right is critical for physical simulation, and other reasons documented at the bottom ofthis page. Using the wrong scale can make objects feel like they are floating or too heavy. If you can't change the scale in your modeling app, you can change the scale in the Import Settings... of the model file.
- Move the First Person Controller to be at the start location using the Transform handles. It is critical that the first person controller does not intersect any level geometry, when starting the game (otherwise it will be stuck!).
- Remove the default camera "Main Camera" in the hierarchy view. The First person controller already has its own camera.
- Hit Play to walk around in your own level.
现在需要解决的是抛开unity集成开发环境完全用script实现。
先从理论入手,它是怎样加载component的,
我需要怎样加载?
5-13-16:01
现在的问题 已经简单到:把一个prefab通过assetBundle加载进来。
16:23 Yes 出来了
先弄成assetBundle,再用www加载,出来啦,爽!
BuildPipeline.BuildAssetBundle(AssetDatabase.LoadMainAssetAtPath("Assets/Standard Assets/Character Controllers/First Person Controller.prefab"),
null, "Assets/Resources/FirstPersonController.unity3d", BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets);
url="file:///E:/danny/nnn/qqf/Assets/Resources/FirstPersonController.unity3d";
WWW www2 = WWW.LoadFromCacheOrDownload(url, 1);
Instantiate(www2.assetBundle.mainAsset,transform.position,Quaternion.identity);
- 漫游
- 漫游
- 漫游
- 漫游
- 漫游
- 计算机系统漫游
- arcgis漫游
- 漫游庐山
- 漫游庐山
- 漫游庐山
- 漫游庐山
- 庐山漫游
- 庐山漫游
- 庐山漫游
- 庐山漫游
- 庐山漫游
- 庐山漫游
- 庐山漫游
- MacBook 连接投影仪
- mac svn命令 linux同样适用
- 游戏开发中的数学和物理算法(13):点积和叉积
- hdu 1045 Fire Net(dfs)
- 插入排序
- 漫游
- VC++学习之网络编程中的套接字
- Java基础加强_JDK1.5新特性
- CString 16进制字符串转为 BYTE[] 数组
- 归并排序
- 游戏开发中的数学和物理算法(14):矩阵的相等和转置
- C#网络编程之 TCP实现客户端和服务器聊天
- 二叉树的建立
- IOS设计模式的六大设计原则之开放-关闭原则(OCP,Open-Close Principle)