上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 48 下一页
摘要: # 实现的功能 (1) 滚轮拉近, 推远相机(带惯性) (2) 鼠标左键左右,上下转动相机(带惯性) (3) 相机跟随角色 # 待实现功能 (1) 转动相机时,如果相机和跟随角色间出现了障碍物,相机自动拉近 (2) 跟随的角色向左或向右行走时,相机自动缓慢转动 # ground为可行走地面(绿色), 阅读全文
posted @ 2022-06-24 23:34 yanghui01 阅读(473) 评论(0) 推荐(0)
摘要: # --昨天 local dt = { year=2022, month=3, day=1 } local utcSec = os.time(dt) utcSec = utcSec - 24 * 3600 local dt2 = os.date("*t", utcSec) print("yestod 阅读全文
posted @ 2022-06-24 23:13 yanghui01 阅读(185) 评论(0) 推荐(0)
摘要: (1) ctrl使用% (2) alt使用& (3) shift使用# (4) 其他按钮使用_前缀,如:_W, _F1 public class MenuTest { [MenuItem("Window/MyMenu/Menu1 %1", false, 1)] static void Menu1() 阅读全文
posted @ 2022-06-24 22:38 yanghui01 阅读(287) 评论(0) 推荐(0)
摘要: # 这2个在Navigation的Areas页签设置 # 假设有黑色的cat和白色的dog同时要从原点,走到对面ground2上去,cat只能走bridge,dog可以走bridge和water # 水流速度很慢(cost设为2)时,cat走bridge(黄色), dog走water(蓝色) # 水 阅读全文
posted @ 2022-06-19 09:01 yanghui01 阅读(256) 评论(0) 推荐(0)
摘要: # 第1种写法: Vector3.Slerp(v1, v2, percent) using UnityEngine; public class SmoothSetDirection : MonoBehaviour { public Transform tf1; public Transform tf 阅读全文
posted @ 2022-06-18 20:50 yanghui01 阅读(441) 评论(0) 推荐(0)
摘要: 向量普通乘 (x1, y1, z1)*(x2, y2, z2)=(x1*x2, y1*y2, z1*z2) 普通乘这个式子就是让分量相乘,没有为啥是这么算。shader中的Blend的颜色乘 DstColor*SrcColor + Zero*DstColor也是类似 Vector3.Dot(v1, 阅读全文
posted @ 2022-06-18 14:06 yanghui01 阅读(1151) 评论(0) 推荐(0)
摘要: # #if UNITY_EDITOR using UnityEditor; using UnityEngine; public class GizmosDrawAxis : MonoBehaviour { public Color color = Color.yellow; public bool 阅读全文
posted @ 2022-06-17 23:22 yanghui01 阅读(277) 评论(0) 推荐(0)
摘要: 和SphereBoundsHandle的主要区别是这边有radius, height, heightAxis三个参数,没有size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; pub 阅读全文
posted @ 2022-06-17 00:04 yanghui01 阅读(55) 评论(0) 推荐(0)
摘要: # 和SphereBoundsHandle的主要区别是radius和size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; public class TestWindow : Edit 阅读全文
posted @ 2022-06-16 23:56 yanghui01 阅读(47) 评论(0) 推荐(0)
摘要: # 这几个都是在Bake页签上的下面几个参数控制的,生成好寻路数据后,其他的都不需要我们处理 上下台阶参数:Step Height: 能走过的台阶高度 斜坡参数:Max Slope: 超过多少坡度就爬不上去 跨越参数:Jump Distance: 不超过多少米可以跨越(不然跨不过去) 跳下参数:Dr 阅读全文
posted @ 2022-06-16 00:29 yanghui01 阅读(482) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 48 下一页