Creating a fish AI

Hey, I just started using Unreal Engine, and I wanted to create a Fish that swims around my level randomly within a certain area. I have the fish actor setup with animations etc, but I just can´t get the Movement to work. I don´t really know how to work with blueprints, so I hope you can help me.

Hi blenderrendersky
Try with this links
link1
link 2
[link 3][3]

If you want to receive more detailed answer try to post screenshots of your blueprint. Describe precisely your problem with your debug info.

[3]:

Take a look at this tutorial: So basically you could just place some waypoints and then randomly change the way he should go (random int + a switch on int) → you can reset the “do once” with an overlap event (so just when he reaches one of those points, he will go to the next one) :slight_smile:

Ok thanks, but how do I get the target points in my fish blueprint, when I don´t want to use the level blueprint?

Then you will have to create actor bp’s which contains an object/icon/arrow that defines the position + you will have to cast the position of it to your character bp so that he knows where he has to move :slight_smile:

Google unreal community ocean project it has a fishflock system where similar fish swim together but try to stay away from predators and they will “split” when you move through them. Its coded in C++ but you should be able to convert it to blueprints.

Hope this helps
Don’t forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going.

If you use a Behavior Tree you can make use of MoveDirectlyToward task in it, and set the target location by either using Get Random Point in Navigable Radius function in a BP(clamping Z to water level) or by preset target locations. Behavior trees may sound like too much work for this but this is the easiest way if you dont want to be bothered with setting up a system to control the movement of the fish. Even the first couple of videos from this series should help you get it working and understand the behavior tree workflow: https://www.youtube.com/playlist?list=PL3hM7_RDaHMz0umAPdszT172uhZTFuP94