2013年12月5日
摘要: (1) float smooth = ... transform.position = Vector3.Lerp(transform.position, standarPos.position, Time.deltaTime * smooth); //lerp 线性插值(from,to,t) t在0,1之间, 0.5代表from - to距离的一半 // Time.deltaTime * smooth , 最后一帧的时间 * smooth 每一次步进from-to的 Time.deltaTime * smooth 每一次调用移动几分之一距离,直到到达目的地 ,实现平滑过度(2) voi... 阅读全文
posted @ 2013-12-05 13:36 鱼 丸 阅读(423) 评论(1) 推荐(0) 编辑
摘要: (1)f_DeltaTime值。 //自己计算每一帧时间float f_LastFrameRealtime;void Start(){f_LastFrameRealtime = Time.realtimeSinceStartup ;}void Update(){float f_DeltaTime = Time.realtimeSinceStartup - f_LastFrameRealtime;f_LastFrameRealtime = Time.realtimeSinceStartup ;}(2) mecanim系统中 muscle可以控制角色各部位摆动幅度等, 速度为负,动画倒着播放Vec 阅读全文
posted @ 2013-12-05 13:36 鱼 丸 阅读(687) 评论(0) 推荐(0) 编辑
摘要: C:\Documents and Settings\Administrator\Application Data\Unity\Asset Store1.health bar: curHealth/maxHealth healthBarLenght = Screen.width/2*(curHealth/maxHealth);2.enemy AI: Debug.DrawLine()调试两者连线 Quaternion.LookRotation(target.position-myTransform.position);myTra..指向target时的旋转角度.3.Melee-combat: Sc 阅读全文
posted @ 2013-12-05 13:35 鱼 丸 阅读(412) 评论(0) 推荐(0) 编辑