在RPG游戏中,为了让人物的死亡更加真实,unity创建布娃娃系统,搞的跟真的一样,尼玛我差点就相信那是真的了。
1.首先打开unity,创建地形,导入已经准备好的人物模块。
2.project下选中该模型,再为该模型添加布娃娃属性:GameObject->Create Other->RagDoll
3.在弹出的框中将布娃娃的各个结点设置进去
4.一定要去掉该人物的Box Coll...
分类:
其他好文 时间:
2014-06-20 11:07:27
阅读次数:
360
碰撞器由来1.系统默认会给每一个对象(GameObject)加入?一个碰撞组件(ColliderComponent),一些背景对象则能够取消该组件。2.在unity3d中,能检測碰撞发生的方式有两种,一种是利用碰撞器,还有一种则是利用触发器。这两种方式的应用很广泛。为了完整的了解这两种方式,我们必须...
分类:
其他好文 时间:
2014-06-08 00:25:58
阅读次数:
356
class AddComponentRecursively extends
ScriptableWizard { var componentName : String = ""; @MenuItem ("GameObject/Add
Component Recursively..."...
分类:
其他好文 时间:
2014-06-07 01:09:07
阅读次数:
254
using UnityEngine;using UnityEditor;using
System.Collections; public class AddParent : ScriptableObject{ [MenuItem
("GameObject/+Add Parent")] s...
分类:
其他好文 时间:
2014-06-07 00:36:56
阅读次数:
202
using UnityEngine;using UnityEngine;using
UnityEditor;using System.Collections; public class AddChild : ScriptableObject{
[MenuItem ("GameObject/...
分类:
其他好文 时间:
2014-06-07 00:16:30
阅读次数:
247
第一种,被调用脚本函数为static类型,调用时直接用脚本名.函数名()。很不实用……第二种,GameObject.Find("脚本所在物体名").SendMessage("函数名");此种方法可以调用public和private类型函数第三种,GameObject.Find("脚本所在物体名").GetComponent<脚本名>().函数名..
分类:
其他好文 时间:
2014-06-04 12:59:13
阅读次数:
307
上一次我们讲了GameObject,Compoent,Time,Input,Physics,其中Time,Input,Physics都是Unity中的全局变量。GameObject是游戏中的基本物件。GameObject是由Component组合而成的,GameObject本身必须有Transfor...
分类:
其他好文 时间:
2014-05-31 12:32:22
阅读次数:
216
1、实现魔兽中简单的Gameobeject传送。主要是方便初学者参考使用!2、与上一篇不同的是。这篇主要是在Gameobeject上实现传送,而不是NPC上。。
例如:你需要在gameobject_template表中找一些模型ID。然后在scriptname这一列中增加脚本名称,本例的脚本名...
分类:
其他好文 时间:
2014-05-26 20:12:43
阅读次数:
221
cube目录下有n个cube,可不可以一下子遍历出所有的对象,而不用一个一个的find?find(“Cube1”)
1、foreach(Transform ts in cube) 2、cube.getCompontsInChildren 返回transform的数组
3、GameObject[] g...
分类:
其他好文 时间:
2014-05-26 08:37:05
阅读次数:
276
获取GUITextureGameObject _obj =
GameObject.Find("Tex1");GUITexture _tex =
_obj.GetComponent();加载图片字节流//读取文件到byte数组byte[] bytes =
System.IO.File.ReadAllB...
分类:
其他好文 时间:
2014-05-16 01:07:48
阅读次数:
242