![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unity学习笔记
Groyo
这个作者很懒,什么都没留下…
展开
-
Unity学习笔记 NavMeshAgent.velocity设置速度 不生效问题
这里我想通过直接设置agent的速度来模拟击退效果,结果发现当人物处于静止状态时,agent的速度赋值不上的问题。但是当人物处于移动状态时,却能正常赋值。解决方法:禁用Auto Braking即可。 public void KickOff() { if (!AttackTarget) { return; } transform.LookAt(AttackTarget.transform); // 计算击退方向 var kic原创 2021-04-06 15:53:18 · 2907 阅读 · 4 评论 -
Unity学习笔记 鼠标点击拖拽等
1.使用unity内置方法 OnMouseXXX(),需要目标有碰撞体。适合2D贴图和3D场景使用。ui的拖动使用下面两种方法。 /// <summary> /// Called when the mouse enters the GUIElement or Collider. /// </summary> void OnMouseEnter () /// <summary> /// Called wh原创 2021-01-21 12:35:54 · 515 阅读 · 0 评论