Fish

ForwardSpeed.jpg
Your looking for this node in the begin play of “BP_NPC_Fish_Base”.
Look in the >Blueprints>NPC_Fish>Base_Class Folder.

In Fish v1.5 I have taken the obstacle avoidance traces off of Tick
sorry to highjack this thread, but how do you take something off tick and have it executed nontheless. i really would need this for my game. is there some king of tutorial or hint you can show me, please

to your fish system:
it looks lovely !! great work.
could you please add some kind of flock mechanism. maybe have one fish follow a slpine and give us a parameter to add as many fishes of the same type as we want to build a flock with typical flock behaviour.

kind regards
stucki

Well for this example here- originally I was doing line traces every frame (On Tick)
Doing traces every frame was overkill, so I am now using a looping timed event to do the same job in a more adjustable and flexible way.
First you create a custom event and put in whatever code you want to execute.
You then kick that custom event off in the Begin Play of your Blueprint- Create a “set timer by event” node, and connect the event to your new custom event.
Now you have a custom event that will loop at whatever interval you enter in the “Time” part of the node.

thx very much for the detailed explanation. I guess it will help me much !!

what do you think about my second whish ? Fish flocking and following splines ?

I will add schooling Fish to the list of future update ideas. :slight_smile:

Hi, i’m very new to blueprints and Unreal Engine, i’ve bought the sistem is very nice, i’ve use it with my own models, i just wonder, is there any way to creatre a Flock with this sistem?

No, Fish doesn’t yet implement schooling behavior.

Hi there.

Looking into a solution for a game i am doing some rnd for at the moment. I am still piecing everything together, so i apologies if i ask some very basic or stupid question. And i understand a lot of this can happen outside of the plug-in on the ai side or elsewhere, i am just trying to get my head around the theory before i cash out.

  • Is it possible to weight preference of fish types to gravitate towards specific areas, like use a volume to make bass hang our around string weed or whatever?
  • Is it possible to create different groups of fish ie. predator/pray and have them react to each other based on their senses?
  • I guess basically it boils down to how much could i control the instances using ai.

Thanks in advance.

Read through Posts #36- 38 in this thread. Create different groups of fish that look for different Water Target sets.

Yes indeed but there is still much for you to still figure out here. For example you can have the predator fish make the Prey fish their current target (when they see one using senses) instead of a water target, that will work fine, however you need to find a place for the prey fish to go and you don’t have navmesh to aid you as there is still no 3D Navmesh, I hope there will be one day.

very doable with custom work on your end. So far it sounds like your mostly just talking about target switching. Switching from water targets to prey targets. the tricky part for you will be figuring out how the prey fish run away from the predators without navigation or Environmental Query. Id love to see what you come up with.
I hope that was helpful. :slight_smile:

Sweet, thanks for getting back so quickly.
I think that answers most of my questions. Reckon this should be a fun challenge to tackle :slight_smile:

https://forums.unrealengine.com/core/image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==

​.

Cant wait to have some fun with it. Thanks again.

Hi!

I migrated Fish to my project and I am wondering how do I actually add a playable fish to my level? I tried dragging the blueprint into my level put when I press play it doesn’t not posses the fish. Also when I opened the PlayAsFish demo map, I do not have any controls. ( Can’t steer the fish) I’ve tried using a joypad as well and nothing. Please help! Also how do I add the caustic effects to my map?

update
Hi I was able to make the playable fish blueprint playable by going into world settings and selecting the blueprint in the game mode override! I still do not have any controls though sadly?

You need to transfer over the inputs. go to the project settings in the demo level, and click on input. Those need to be transferred over to your level. Inputs are always tied to project.

Ok thanks! Do you remember which setting slows the speed of the playable fish down?

Open “BP_PlayAsFish_Base” - in this folder- (Fish > Blueprints > Play_As_Fish > BaseClass)

The Variable “Current forward speed” is how fast the fish moves forward.
Set this variable to whatever speed you wish.

One of the Inputs for Fish is called “SpeedBoost”
in the EventGraph for this Blueprint look at the “SpeedBoost” section
Open the SpeedBoost Timeline (Double click it)
When Speed Boost is pressed it adjusts the “Current forward speed” So you will want to adjust these numbers in this Timeline as well. When the SpeedBoost button is pressed the “Current forward speed” is set to the right number and when released the “Current forward speed” is set to the left number. I hope that was helpful. :slight_smile:

1 Like

:slightly_smiling_face: Thanks!

Hi ! I have edited all of the variables that you mentioned and it appears the fish is slowed down until I press play and then the feature to control him in play mode. The fish then speeds up to the default speed for some reason. I’m not sure what I’m missing?

Would it technically be possible to make the fish stop completely if I change the speed boost number on the left to “0” ? I’d like to be able to stop my playable fish so that he can appear to eat algae.

update

Looks like unreal 5.0.1 moved some things that I didn’t see but I got my fish to slow down and configured speed boost to make him stop! Thank you so much for your help!

update

How do I slow down the NPC Fish blueprint? :slight_smile:

Open “BP_NPC_Fish_Base”. In the Event Graph, after Begin Play - look for “set current forward speed”. There should be a random Float in range node that you can set.

1 Like

Thanks! :slight_smile:

1 Like