Hi, Beginner here,
I am trying to recreate the Goomba AI from Mario 64 using behaviour trees, but struggling to work out/find a resource to guide, on how to get an NPC AI that patrols to random locations within a radius of 800 units, but only travels a max of 200 units before looking for another location. Plus, I want it to jump first if it needs to turn more than 90 degrees.
Every resource I find only teaches how to make an AI move from point to point in a straight line, where as the goomba’s move a little more freely.
My hunch is that the two locations will need to be separate tasks within the behaviour tree, “Find location within 90 degrees of current angle”, and “find location over 90 of current angle” with a jump task proceeding the latter but I might be overthinking it.
I am using GetRandomLocationInNavigableRadius which gives me a location, I am guessing I need to find the forward direction of the actor then test that against the new location and set up a branch based on whether the outcome is over or under 90 degrees. I have zero idea how to do that in a task however.
Thanks so much
They don’t move from 0 to 200 units, they just move 10 or so units, calculate the next spot, and so on.
They do so while moving along towards a point that was chosen before and is used until it is reached.
At that point, they turn and pick a other location.
You probably want to create custom tasks and set up custom hooks for them.
Likely (at x2 speed) one of the best hands on examples
Actually there is a better live training, involving a deer AI ehich better illustrated the proper use of blackboard. Can’t find it however, may have been pulled…
Thank you so much, I will go through these now.
Wow… I think maybe I will just stick to blueprints for now. This stuff is way above my current unreal skill level.
The deer one was more entry level,
But yes you do need to have some existing knowledge on the character, how it works, the animations etc. to be able to pull things off correctly.
A simple example:
You don’t just “move to” you rotate first, then move to.
Unless you know your character’s animation are set up to habdle rotations automagically somehow…
Yeah and I need to limit the find random location to “find random location in front of you”