Dear all, I hope someone could help (direction to tutorial / code example) as I’m getting nowhere
Setup:
I have 2 actors in a scene (mannequins). They are on a green plane (image 2 sports players on a green pitch).
One of the mannequins is user controlled and can run around. The other is AI controlled.
Plan:
I want the AI mannequin to follow the user controlled actor…BUT…to always keep a certain distance away.
Current situation:
I have the 2 mannequins spawned - ok
The user controlled mannequin runs around the plane - ok
The AI mannequin runs towards the user controlled mannequin - ok
For the AI I’m using a Behavior tree (Image 1). The idea is that the AI mannequin 'Move To Player (user mannequin) but goes through a Condition check first to see if already close enough (Image 2)
Problem:
I can’t get the AI mannequin to hold back and keep a certain distance, it just runs right up to the user controlled mannequin.
The AI mannequin just runs straight up to the user controller mannequin, and I get this error message in log upon exciting (Image 3).
I believe that I’m simply not able to access the user mannequin’s location in the AI behavior tree condition check, thus the condition check comes back null.
Am I right in this?
If so, how do I achieve this…apologies I’ve looked for weeks and can’t seem to find a way of doing this/
Or am I barking up the wrong tree.
Any help would be greatly received. Thanks