官术网_书友最值得收藏!

Creating the Behavior Tree

Let's add a Behavior Tree by going to the Content Browser and selecting Add New > Artificial Intelligence > Behavior Tree, as shown in the following screenshot:

For now, we will call our Behavior Tree BT_MyFirstBehaviorTree. Again, here, I'm using a specific naming convention to prefix all Behavior Tree assets with BT_. Once again, please follow the naming convention, unless you have a specific reason not to.

When you open the Behavior Tree window, you will see a single node called Root, as follows:

The Root is where the execution of your Behavior Tree begins (from top to bottom and left to right). The Root itself only has one reference and that is the Blackboard, so it cannot be connected to anything else. It is the tip of the tree, and all subsequent nodes are below it.

If you drag from the Root Node, you will be able to add Composite nodes:

For this, the Behavior Tree Editor is very intuitive. You can keep dragging out from the nodes to add Composite or Tasks nodes. To add a Decorator or a Service, you can right-click on a node and select "Add Decorator..." or "Add Service...", respectively, as shown in the following screenshot:

Finally, if you click on a node, it is possible to choose its parameters in the Details Panel (the following screenshot shows an example of a Move To Node):

主站蜘蛛池模板: 达州市| 科技| 莱阳市| 涞源县| 健康| 玉田县| 桐城市| 湖北省| 雷波县| 阳东县| 绥芬河市| 孟连| 龙口市| 陇川县| 高雄县| 涡阳县| 广元市| 沙田区| 海伦市| 峡江县| 绵阳市| 拉萨市| 亚东县| 河西区| 珲春市| 黄冈市| 保靖县| 隆林| 昭苏县| 比如县| 衡阳县| 嘉定区| 乌鲁木齐县| 尤溪县| 乌拉特前旗| 桐庐县| 桦甸市| 土默特右旗| 涡阳县| 河北区| 康乐县|