Skip to content

bentlemon/Dog-Knight-Basic-Behaviour-Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dog Knight! U・ᴥ・U

Description

A simple behaviour tree implementation in Unity (2022) with patrol and attack!

What he does:

  • Random patrol pattern with random waiting time
  • Detect enemies & walks to them
  • Slays his enemies!!

Code

Originally uploaded to Gitlab, only asset code is provided here!!

Tree setup for Dog Knight

Dog knight has a simple tree setup that is the following:

        Node root = new Selector(new List<Node>
        {
            new Sequence(new List<Node> {
                new EnemyInFOVRange(transform),
                new GoToTargetAction(transform),
                new EnemyInAttackRange(transform),
                new AttackAction(transform)
            }),
            new PatrolAction(transform),
        });

Demo Video

Click the following image to see the result! :)

Dog Knight Demo Video

3D Assets used

About

Just a showcase of a behaviour tree implementation in Unity!

Topics

Resources

Stars

Watchers

Forks

Languages