Shark Swimming?

Hi all, im kinda stuck with a project im working on at the moment, im stuck trying to figure out how to make AI for a shark for example i would like it to be able to swim forward and turn but not be able to turn and go backwards, any help would be appreciated.

Just don’t give it movement controls for moving backwards?

I knos its been a while but was wondering if anyone could help with this? i need to make a shark AI swim around, i can make A standard Ai but how can i make that ai able to go up and down instead of just moving along the floor?

Since there is no out of the box volumetric navigation you will either need to implement it yourself in c++ or try fake the movement.
I assume you use blueprints only then faking it is the only real solution.

Here some thoughts how you could do it.

Have a pawn (or character) blueprint with a mesh component , set your shark as the mesh. The trick is that you should try and parent the mesh component to your scene root component and just modify its local transform on the Z axis to be at the height of i.e. its prey. So the shark could be “wandering” on the navmesh at height 10 by default but once it switches into attack behavior, you set its height (probably want to interpolate the value over time) to the height of its prey.

Hope that gives you some ideas to start with, good luck!

There is already some downloadable files up on the forum here for Fish AI and boids flocking algorithms for fish schooling, do a search in the learn tab and you will easily find it. The creator did several youtube videos on it too.