设置Sequence的中断类型

AbortType打断任务 Sequence - 【Abort Type】属性

None:没有打断

Lower Priority:中断同级的任务,即中断Seek任务

作用:只要行为树还在执行的时候,其子级(Can See Object)就会一直在执行。也就是说Can See Object随时在检测,只要它检测到了目标,那么它就会返回一个True,这时Sequence也会跟着返回true,而Selector是或操作,所以Seek中断不会执行了。

AbortType打断任务 Sequence - 【Abort Type】属性

没有检测到巡逻目标时

巡逻角色没有检测到巡逻目标的时候返回false,这时会执行Seek任务,让巡逻角色Seek目标点移动

AbortType打断任务 Sequence - 【Abort Type】属性

此时Can See Object会一直不停的检测

AbortType打断任务 Sequence - 【Abort Type】属性

 

检测到巡逻目标时

巡逻角色检测到巡逻目标的时候,会中断Seek任务,并返回true

AbortType打断任务 Sequence - 【Abort Type】属性

AbortType打断任务 Sequence - 【Abort Type】属性

最终效果:

AbortType打断任务 Sequence - 【Abort Type】属性

 

相关文章:

  • 2021-06-09
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-10
  • 2021-07-14
猜你喜欢
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2021-11-22
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案