Unreal Engine AI Update


Continuation with AI Development

So continuing on with the AI development. As previously stated, I am developing the state difference so it gives the player a chance to get away and gives the AI different ideas on if the AI wants to hunt or go to the area or not.


AI perception senses

One other thing that I have added into the AI is I have now added in, AI perception which composes of three separate senses; they are touch, sight and hearing.  I have found problems with the touch sense as it doesn't work efficiently so I had to add a sphere around the outside on my AI player and set it to overlap with triggers to counter act the sense not properly working.




With this, in regards to the other two senses; I started to develop them in the form of stimuli to allow for the multiple senses.  This in turn with help with the state decision to determine on what mood the AI should be.



The BP above allowed to help if each sense is being initiated or what to do when it is not.  This BP will allow to check if new stimuli is being initiated.

Overall for this part, it's not finished.  The sense work and development of the overall state number is working but I am having issues where the value for the state is not dropping which I will need to look into, I believe it's essentially me not adding in the right float value for the maths, it will be something I will definitely need to have a look at as the value is not dropping.  Saying that it isn't fully completed but I can edit a couple of things into here.


AI states

Looking at the states, I have made them into a enum to allow it to be changed, I have then set it to change with a value or a change in the enum which in term will change how the AI reacts and changes.  The AI overall, is set up to be a state system so it'll change dependant on the value from the stimuli from the above.


To ensure that all the stimuli is working and the state value is correct, i have debugged it to allow to see if the values are correct and if the overall state value is working efficiently.


Any Issues?

I am having a problem with my blackboard BTdecorator for if the player is in attack range but it is confusing as the AI still work efficiently.  Although it is working, sometimes it errors on me and sometimes it doesn't but the BB is working as it should.  I am unsure what to do in this as although it is erroring.. it looks like it is working efficiently.




Below is a video update to see what it is doing.  Next is possibly thinking of patrol setups to allow for the hunter to scope around, however I am unsure if I want to use a patrol but we'll see.  One way or another the idea of a patrol could be beneficial for idle (unsure) and then if the state is up to the go patrolling and change to random movements within the area vicinity.


Comments

Popular Posts