上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 48 下一页
摘要: # 这2个在Navigation的Areas页签设置 # 假设有黑色的cat和白色的dog同时要从原点,走到对面ground2上去,cat只能走bridge,dog可以走bridge和water # 水流速度很慢(cost设为2)时,cat走bridge(黄色), dog走water(蓝色) # 水 阅读全文
posted @ 2022-06-19 09:01 yanghui01 阅读(260) 评论(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 阅读(445) 评论(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 阅读(1169) 评论(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 阅读(283) 评论(0) 推荐(0)
摘要: 和SphereBoundsHandle的主要区别是这边有radius, height, heightAxis三个参数,没有size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; pub 阅读全文
posted @ 2022-06-17 00:04 yanghui01 阅读(62) 评论(0) 推荐(0)
摘要: # 和SphereBoundsHandle的主要区别是radius和size参数,其他基本一致 using UnityEditor; using UnityEditor.IMGUI.Controls; using UnityEngine; public class TestWindow : Edit 阅读全文
posted @ 2022-06-16 23:56 yanghui01 阅读(53) 评论(0) 推荐(0)
摘要: # 这几个都是在Bake页签上的下面几个参数控制的,生成好寻路数据后,其他的都不需要我们处理 上下台阶参数:Step Height: 能走过的台阶高度 斜坡参数:Max Slope: 超过多少坡度就爬不上去 跨越参数:Jump Distance: 不超过多少米可以跨越(不然跨不过去) 跳下参数:Dr 阅读全文
posted @ 2022-06-16 00:29 yanghui01 阅读(498) 评论(0) 推荐(0)
摘要: # Transform的默认编辑器类名不叫TransformEditor,而是叫TransformInspector。除了这个,其他基本和CustomRectTransformEditor类似 #if UNITY_EDITOR using System.Collections.Generic; us 阅读全文
posted @ 2022-06-15 23:26 yanghui01 阅读(219) 评论(0) 推荐(0)
摘要: # public class ExportNavMesh { [MenuItem("Tool/Export NavMesh")] public static void Export() { var navMeshTriangulation = NavMesh.CalculateTriangulati 阅读全文
posted @ 2022-06-15 00:06 yanghui01 阅读(564) 评论(0) 推荐(0)
摘要: # 自动创建方式,勾上Navigation Static,并把Area设为Not Walkable # 手动创建方式,加一个NavMeshObstacle组件 Shaper:障碍物的形状,有Box和Capsule两种,默认选Box即可 Center:障碍物包围盒的中心点,默认即可 Size:障碍物包 阅读全文
posted @ 2022-06-13 23:38 yanghui01 阅读(354) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 48 下一页