[UPDATED 5/16] A.I. Templates - Bot, Car, & +Flying AI

If you need any help, please let me know.

If you would like to help, just post some of the work you’ve done and something you leaned. Something someone else can learn from. :slight_smile: I would be interested in what you’ve learned.

Sneak peak of Flying AI Template:

I can’t imagine that was all that easy to pull off… Is it dynamically avoiding the boxes or following a path? Either way it looks really cool, I’ll be interested to see how you did it, nice work! :slight_smile:

Its had some hiccups along the way. Its dynamically avoiding the boxes while navigating to only 5-6 way points randomly placed within the ‘asteroid field’. So yes, its totally avoiding all on its own with little assistance from path following. I have collision and object avoidance techniques going on all at once to prevent collision. So Collision Avoidance is more of the , +xyz on the input vectors to avoid collision nearby. It also has an axis locking mechanism to avoid one octant plane at a time, preventing it from blocking left and right at the same time. Additional randomness was added to check for minimum distance of collision traces. Last thing I have completed is the Object Avoidance. There is 4 traces which circulate around the ship shooting in the forward axis. When one of the traces hit, the collision is scanned out in each direction excluding the forward axis.What is returned is either the shortest distance to avoid the object, and the shortest distance to the goal. To again, add randomness the Object Avoidance choose between those two results. It also has some Flocking Behaviors, but its really basic at the moment.

So all of makes for the AI being able to duck and dodge most fairly sized objects. Its has* it own weaknesses*, but its perfect for my situation. So I will be discussing that, and how you can tweak your Flying AI to fit your situation.

What I’m currently adding is more Flocking Behaviors. I had the ships hit each other a few times and it was really funny. Exciting as well, so it made me think of a school of fish. How awesome would it be to see a fleet of AI flying around asteroids chasing other ships?

Thanks for the support! :smiley:

Glad I could help…
Not sure what I did, but hey ill take it :slight_smile:

Great work man!

You got the rocks!

Hi Guys, I’m fairly new to Unreal Engine and I’ve been looking at the AI Driving tutorials. There doesn’t seem to be much in the way of tutorials or information but I think you’ve done a great job explaining how you have done it.

I’ve downloaded the example to examine how it works and I’m in the process of using my own project and mesh to create a AI on a vehicle, however in the level blueprints, there are 2 nodes (I hope that’s the correct term!) to these two variables, which I can’t find any reference to them within my own project, and I’m not sure where they are referenced in the example.

Please see the screen grab from the driving AI example.

Can anyone point me in the right direction as to what these nodes/variables/blocks are referencing and how I can reference them in my project??

Thanks in advance.

Hey ,

I apologize about that! That is something I just used to ghost the AI while its driving around. If you look towards the beginning of that Flip-Flop, you’ll see the action which controls . I haven’t had time to make tutorials because I’m working but I have plans to make them all again, in detail, with visual explanations - starting with the Flying AI. :smiley:

Thanks,

L. Newton

Hi ,

No need to apologise, your driving A.I. example as been extremely helpful and I wouldn’t have had a clue where to start. Thanks for creating the example! :slight_smile:

I’ll have another route through the project, it was the end of the day and I couldn’t find the reference to either one of those, so I thought I would pick somebodies on the forum while I slept. I’ve woke up and I’m now refreshed, so hopefully I’ll crack it, so thanks for the advice as well.

I’ll look forward to seeing more of your tutorials when you get around to it, they have been a huge help.

Thanks,

:slight_smile:

Found it! The reference for those variables “aiPawn” and “swap” was in the “My Game” blueprint.

Thanks again. :wink:

Hey there, Im not sure if the is related to the conversion to Unreal Engine 4.6, but I always get an error message when I open the Car AI project and try to hit play: It tells me about an error in a blueprint, I went there, clicked compile, and the error is fixed and the game runs again. I try to save, close project, restart, but the error happens again and again!
It looks like

Hovering the error, show error:

Other node shows at hover!
HQ3q2UJ.png

Again: Clicking compile at the top fixes the error temporarely until you open the project the next time again!

Try deleting the event entirely, and reassigning a new event. Its a weird bug that can happen.

That should fix it, I’ll re-upload the project.

Thanks for your quick reply. I tried of course to do already, but it didnt go away for me :confused: When you say remove the custom event, do you talk about that specific node? I tried it only with the node, is there some other place where I have to change something as well?

I see – is something else more recent. UE has a hot fix now luckily, its in the 4.6.1 patch! ;D

I am sad to say I am on 4.6.1 right now, and the error doesnt go away. But now I can change the event with another. it looks like , after I open the project:

hey i want to have a third person character go into a garage and spawn a vehicle. so i want to go from third person char. to being placed in the car and driving it away. can you do a tutorial on that?

Hey awesome AI patrol tutorial! One quick question, I got it all to work with 1 AI however when I add another AI/Bot it will do the same patrol as the first one. Everytime a bot spawns he gets his own patrol points and I have position with each patrol point but regardless all the bots in the level have the same patrol point. Did you have too?

=/ I read by one of the staff members you asked that it would of been fixed in 4.6.1 but I guess not. Unfortunately its a bug in 4.6 currently, so you must use the 4.5.1 which I’ve provided.

That I could. :smiley:

What you have to do is assign that agent to the routes they belong to. So when the bot searches for the routes, they check to be sure they belong to that route point. A good way to implement is by assigning IDs which can be identified on the Agent and the Route when doing the check.

So in practice, just add a variable to the route actor named groupid. Assign a groupid to each set of route points you have. Then add one more variable to your agent actor named groupid, and then assign the appropriate bots groupids. Lastly, modify the get next route to also check groupids of both the agent and the route match before returning the next route point.

Hello! That flying AI is incredible! Will you release it or send it to marketplace?? And if you will, when? :slight_smile: