摘要: using UnityEngine;[RequireComponent(typeof(Rigidbody))]public class MovingPlatform : MonoBehaviour{public float speed;public Transform start;public Transform end;private Vector3 startPos;private Vector3 endPos;private float distance;private Vector3 direction;private Rigidbody rb;public void Awake(){ 阅读全文
posted @ 2013-03-20 00:02 _尼克 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Unity Mathf 数学运算(C#) 博客分类:Unity3DMathf.Abs绝对值 计算并返回指定参数 f 绝对值。 Mathf.Acos反余弦 static function Acos (f : float) : float 以弧度为单位计算并返回参数 f 中指定的数字的反余弦值。 Mathf.Approximately近似 static function Approximately (a : float, b: float) : bool 比较两个浮点数值,看它们是否非常接近, 由于浮点数值不精确,不建议使用等于来比较它们。例如,1.0==10.0/10.0也许不会返回true。 阅读全文
posted @ 2013-03-19 23:56 _尼克 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 3D游戏引擎——Unity中网格合并示例研究 UNITY3D 实例 Character Customization 阅读全文
posted @ 2013-03-18 17:44 _尼克 阅读(586) 评论(0) 推荐(0) 编辑