If you want your character to overlap with an offset as to not start swimming the second you touch water, go into your 'WaterBodyOcean' blueprint (or whatever you called it) and search for 'Collision Height Offset'. Set this to a negative value. Now you can trigger the swim once your body is submerged.
@@Eqqs Once you're in the BP described in the guide, just make sure to select the first item in the "components" outliner (it'll say (self) at the end of whatever you named it). Now, in the details panel I searched for 'height offset' and found the setting that way. I set it to -100 and it works great.
@@OzarksVHS Thanks a lot. As a Unity developer it is challenging and confusing to move to a new engine and the guides and people like you make it easier.
Problem is that it also sets the underwater post process effect to that same level. Edit: I made a different solution. I made a socket for the pelvis, and stored its Z value when touching the water. Then I made a loop that checks the difference between the start of the Z value, to the current Z value. When the difference reached a number which is above the target depth, the loop stops and executes Start Swimming.
Just a quick tip for everyone asking about animations: Mixamo offers a "treading water" that's a good idle, and using their sliders system you can take their standard swimming animation and save it as various speeds.
Thanks. It works. For those having problems with the character floating over the land on exiting the water, this was a better solution for me: Go into your water body blueprint. Scroll to 'collision presets', and change it from 'water body collisions' to 'custom'. Scroll down and set the collision responses manually to 'ignore', except for 'world dynamic', 'pawn' and 'physics body'. Set those to overlap. Also if your character is jumping out of the water and then sinking: - After your initial input/axis and then branch to true, add a 'Set Movement' node, and set it to 'swimming'. Then connect to the 'add movement input. Then at the end of your Start Swimming function, add the 'set movement' node again, and set to swimming. Out of that node add a 'set gravity scale' node and set it to something like 20. This will keep your character from swimming out of the water, but it won't sink to the bottom either. Don't forget to reset the gravity back to normal on stop swimming. I also set and reset the capsule radius to smaller and found this helped some more with when the character transitions from water to land.
So I have done what you recommended and it is working pretty well. Thank you so much! One thing though, after making the gravity adjustment it did fix the swimming out of the water then falling back in. However, there is a bit of bobbing when you swim at the surface, and if you stop swimming at just the right moment, it sinks you down really fast. Any ideas on how to prevent this?
@@Ckinproduction I know there are ways to know what angle your character is, which I'm sure would be part of the solution here but I don't know enough about it yet. If you can work out the angle and momentum of your character whilst swimming you might be able to solve it.
@@studiobaxter1242 I’m pretty new to UE. But I have been able to figure out most programming problems I have been faced with. So, hopefully I will find a fix. If you by chance find a solution, let me know. It would be much appreciated.
@@studiobaxter1242your solution works well. The character at least doesn’t come out of the water and fall back in there is just a very very slight amount of Bobbing and if you stop moving at just the right second the character drops way down in the water. But never leaves the swimming animation.
For those who have trouble about character sinking, that's because Launch Character will change character to falling state. Just Replace Launch Character with Add Movement Input and Set Movement Mode to swimming behind. And in stop swimming, Set Movement Mode back to walking
"The animation is in the description!" The Link In Description: a pack of 2,548 animations with no distinct names. For any folks just interested in what animations relate its the ones labeled 125_XX up to 126_XX. Bro it's one animation in an open license. Would it have been that hard to take the one you got, export to fbx from unreal and plop it in in any of thousands of file uploading websites available? Welp, thanks for the link to free mocap I guess. Still the laziest thing i've ever seen in my life. Buh eh you got some quick easy content out of this one! 20 minutes out of a 5 minute implementation is pretty impressive.
@xtynger1236 He's not giving anyone anything. The animations are a free pack someone else made, someone else packaged and distributed. I'm not complaining about how it was packaged, I'm criticizing the youtubers delivery of information. I mean my comment doesn't really even make sense outside the context of this tutorial. The lacking names is really only a problem when you need the specific ones he uses here. Without those it's kinda annoying to dig through over 2000+ animations when you only want like 3.
Would love an updated version of this tutorial where you optimize certain features, no more jittering, smoother swim to run transition when coming out of the water. Also i have a bug where if i jump into the water & hit the bottom of the landscape my character just disapears & im forced to restart the game ;( Love this tutorial tho, thank u so much & hoping to see more ;)
I had jittering (looked like character was having a fit!) on both swimming AND treading water, I found that setting the "Update Overlaps" flag on the "Set Capsule Half Height" node at the end in the StopSwimming event seems to have fixed it (touch wood) for now! His "infinite loop" error that he didn't explain WHY he turned off the overlap update is possibly due to resetting the capsule height then causing another Begin (or End) Overlap event to be generated!?
This tutorial is awesome! I had the same issue as other viewers with the character sinking after getting into the water. I found that in the Character BP, after you set IsSwimming to true, drag a Set Movement Mode node and change the New Movement Mode to "Swimming." And after you set IsSwimming to false, drag a Set Movement Mode node and change the New Movement Mode back to "Walking." This fixed the issue for me.
Thank you so much for this! One thing: If you put the Set Movement Mode after the IsSwimming and it's still not working, try putting the nodes right after the Start Swimming/Stop Swimming even, it worked for me. Cheers everyone 🍺
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
Amazing tutorial, exactly what I needed, thank you! Could you please explain how to set the IK rig? I see here in the comments you suggest to set the Alpha to 0 in EventGraph, but I wasn't able to do it...
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
Can this be updated for UE5.4? It has a different movement input system where it uses a singular enhanced input action and it doesn't have a singular axis value. I found a kind of a workaround to this specific issue. But now I have another problem: When I connect the actor begin overlap node to another node (exec), my water is invisible. If I don't touch the blueprint and leave it empty, water works normally.
There is 2 movement inputs in the character blurprint. there is left/right and forward/backwards. I was confused for days. Its in the same string from inputs. You want to spice in at the forward/backwards section. Its after the second (add movement input) add your branch there.i would show a screenshot but cant. Let me know if i can help. I feel ya bro it took days to figure out
Its at 3:58 is forward/backwards is on top and left/right is below it. Then use the vector that is going into (add movement) into your branched one. Im using 5.4 so i kniw what your looking at. Hope it helps
so question.... everytime i've attempted to use a players physics volume in a replicated setting whenever the host swims it forces everyone to swim. Whats the workaround for this?
5:40 when I try to turn the ocean into a blueprint, it always creates a strange edge out the outer limits between where my terrain ends and the expanse of water beyond the level geometry begins.
In the event graph of the anim (or in general really) why not drag in the movement component and use the Is Swimming? It prevents the need for a cast to the 3rd person character blueprint. Seems to be working ok for me.
This method will not work with multiplayer because it affects all the characters in world. So no matter where the character is they will start swimming since we are Changing overlapping physics volume
Thanks for this tutorial, swimming at last made easy! Can't get it working for the custom water body, doesn't respond to the overlapping events. Any tips?
Hi, Thank you for this tutorial. it has been very helpful. However, i am stuck at the swimming animation retargeting. After retargeting the animation (imported from mixamo), the swimming action is distorted and the mannequin floats intead. I am unable to find a solution online. Please help.
When I swim up to the surace of the water I go back to walking for a second and slightly launched out of the water, but when I go back into the water and back to swimming, I drop all the way down to the ground at the bottom of the water (as if effected by normal gravity, not the swimming/water lightweight effect). Id there a way to fix this or did I do something wrong?
Hi, so first of all try this, in the start swimming event, on the Launch Character node, make the force multiplier a ver very small number, like 0.1. 8:56 , this will probably solve the issue of launching the character. Then about the player dropping to the bottom, try to change the gravity scale when we start swimming, using the "Set Gravity Scale" node. Let me know if this helps!!
@@GorkaGames The gravity scale idea worked great, and I fall much slower, but I still sink all the way to the bottom after I jump out of the water. It seems like it doesn't start the swimming animations or controls when I fall into the water (from a tall height or just jumping out of the water and then back in). Also, I continuously get this error while playing: Blueprint Runtime Error: "Accessed None trying to read property BP Third Person Character". Node: *Set isSwimming* Graph: *EventGraph* Function: *Execute Ubergraph ABP Manny* Blueprint: *ABP Manny* Do you know what could be causing this?
why isn't it working in my engine?🥲... When I retargeted it, the ue5 manny kinda merged with the floor. And in the ue4 manny animation the feet were not moving as well... Am I the only one facing this? How should I get rid of it?
Wanted to start out by saying this has been the easiest tutorial I have found for swimming on TH-cam as well as the forums. It works MOSTLY as it should. With that said, I am struggling with the same issue someone else in the comments had where if you go up to the surface you immediately sink down. I tried fiddling with gravity and the force values but they don't seem to effect it immedietly sinking down. It seems like a quick fix but how exactly can I stop that from happening?
Hmm.. Try to add a small delay when you call the "Stop Swimming" event. It might be that it desables the water volume trigger too quick and the character`s capsule might be slightly under the ground, so it sinks.
@@GorkaGames The delay in theory works, but it applies to every time they leave the water. And I cant find a good balance on how long to make the delay. For example: if I make it too short, it still applies normal gravity when I leave the water in most instances. If I make it too long, it fixes the other issue but now makes the player fly for that amount of delay when leaving the water.
@@starmangalaxyyy1710 Same here. When we reach top of water and can't stand up the Player should stick to top of the water, shut off underwater sound, and be able to swim on top of the Gerstner Waves with a buoyancy like a boat until we tip controller down past a certain angle then we would dive. I just don't know how to code it and have found no info on it yet sadly. Would be forever grateful for a tutorial on that...wink wink 🙂🙂
hi @GorkaGames nice tutorial, but i need activate the control rig and locomotion. My character is swimming perfect, but the legs animation is broken. How i can activate control rig for swimming?
for your swimming animation do you know the file name for it because I found 3 under the name swimming and they are all different and my legs do not work so If you know a fix to that it would be greatly appriciated
How would you "fill" an area with water with a water body custom. Just add in the physics volume separately, or am I just missing a feature in the water body custom details
BlendSpace1D is deprecated in UE5.2 (maybe from 5.1 onwards?) just use Blend Space node! Also found that on my ABP_Manny event graph (when running the game) I had to do a "IsValid?" node on the BP Third Person Character (in the "Then 3" sequence he added to the "Event Blueprint Update Animation" as I got LOTS of "object is none" errors all the time when trying to set the isSwimming variable! Adding that fixed it, and seems to work ok!
Good idea, there are a lot of methods to do this. I guess the most convivient way to do this is to join Niagara with Projectiles. I will see of I can make a tutorial on that!
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
@@wawawalker drag it directly into the project folder itself, if you havent figured this out in a month.... if you did hopefully this comment will help some one in the future.
@@PolyPixxel thank you this helped. However, the animations are just t-posing. I've tried using the UE4 mannequin skeleton and retargeting but nothing :(
Everything worked but i ran Into a problem, when I enter the water and i look down with my character, the underwater rendering disappears and then it doesnt look like that i am underwater, and when i Look upwards again, the underwater Color appears again. I tried some things but nothing worked. Can you help?
Does anyone know how to fix the problem when you try to go into the water but instead you are just standing on top of it almost as if it is completely solid?
My character just sinks immediately. I tried all the fixes in the comments here and nothing is changing. I always have to jump to activate swimming. As soon as I do anything else with my character other than move forward/backwards, it sinks again. What in the world is going on here? I'm on 5.2 and I really want to make a full swimming system for my game.
If anyone getting the problem in which the system shows that the character is already in water even you are ar surface . It is because you have collision boxes in your player bp. To fix that create a custom collision object channel for the collision boxes and set that ignore in collision settings of water bp
something with the overlap is wonky for me. if i do on actor begin overlap the is swimming Boolean is permanently true. if i do component begin overlap it just doesn't work.
Figured it out. I have a few sphere collisions around my player for other mechanics in the game. Those collisions were causing the ocean underneath the landscape to trigger the overlap event
Thank you for the explanation! I'd like to make my own swimming animation, since all I've find seem to be flawed someway, could you please tell me how or link a video?
I've made one animation, the preview seems ok, but when I hit play the legs keep vertical, do you know how to fix this? Also, any guide on making animations?
Hii, I tried this tutorial, but unfortunately, none of it is working. I tried checking if i missed something, but i couldn't figure out what was the issue, can someone help me ?
so wen i went back, i realized i pluged in the x axis as apposed to y. went back and fixed this but nothing changed. i am still walking on water instead of in it
having a issue where the swim animation starts playing as soon as the user touches the water but it's shallow water so it's showing the swimming animation above the water. How can this be fixed? Also do you more details on the IK rig setup for swimming that you mentioned in the video?
Yeah, so the animation has basically an offset from the pivot (floor), so that`s why it`s "floating". you could edit the animation on blender, or even better, use the "add offset" node to the character`s mesh when you are swimming. About the IK Rig, you can set the "Alpha" value to 0 when you are swimming, and then back to 1 when in land. You can do this from the animator`s event graph
Great tutorial! Any way that when the character is swimming near the water surface it snaps the swimming animation to the surface? Cant seem to figure it out. Im on ue5.1
Also i would love to know how to make it so you go into the water up to the stomach and then stop swimming and likewise backwards! If you could endulge me
Thank you so much for this! You are one of 3 tutorial creators on TH-cam that are understandable for me and make things function :) All works well with swimming now, but one thing left: At 15:30 you say you can go up and down. I can't. How do you do so?
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
Seems to reset any wave action you had going on in 5.2 might want to jot those down before you get too far ahead (l lost my wave source (Gerstner waves) and the water got real still. Also you can avoid the cast if you store the info that you walked into the water in a material parameter collection. Then do the stuff about being in the water directly in your character BP instead. It also means that if you switch playable characters it doesn't break. Better perf, more expandable, same number of steps. Yay. Super helpful for getting me the skeleton of it though thanks mate.
its when we enter in the water to swim we add a tiny jump force to make a nice transition from walking to swimming. If not the transition would not occur smoothly
Thanks! Yeah so all you need is an MoveTo node, and then there's actually a node called "Get Random Point in Navigable Radius", and it will pick a random point in the nav mesh, making the AI roam around randomly like in GTA. You will also need a "NavMesh Bounds Volume" in your scene of course. I have an enemy AI tutorial that covers some of this, except the part of the random roam, but take a look into it: th-cam.com/video/xm-7m5Fw1HU/w-d-xo.html
@@GorkaGames yes i did, then when everything worked shes just always swimming on land after I added it to the animation blueprint. i do have complicated animation data tables and blueprints
@@GorkaGames yes ill message you tmrw on twitter. I believe I deleted all the logic and the blendspace as it was interferring with errors on build down. But I'll piece it back tmrw and then show you whats going on.
I did all this and everything works. But 2 problems. When character enters water and goes into swimming animation the controls switch. Forward is now the D key. W and S do not do anything. The A key reverses direction. ??? Problem 2... I drop a new lake into the map and created the blueprint for it, and character just runs through it. No swimming animation. I'm using 5.1. Also when I get out of water and back on land the controls revert back to normal. Lol also the main state machine is showing a warning
Anyone else have a problem with the character "sinking to the depths" of the ocean while swimming and then seemingly bouncing off the underside of the surface to the bottom again immediately if u use the standard player controller? :o(
Im having same issues did you find how to fix it as i can only move backwards and cant figure it out i just want it back to normal any help would be much appreciated
If you want your character to overlap with an offset as to not start swimming the second you touch water, go into your 'WaterBodyOcean' blueprint (or whatever you called it) and search for 'Collision Height Offset'. Set this to a negative value. Now you can trigger the swim once your body is submerged.
Where do you add that? And what to set the Target as?
@@Eqqs Once you're in the BP described in the guide, just make sure to select the first item in the "components" outliner (it'll say (self) at the end of whatever you named it). Now, in the details panel I searched for 'height offset' and found the setting that way. I set it to -100 and it works great.
@@OzarksVHS Thanks a lot. As a Unity developer it is challenging and confusing to move to a new engine and the guides and people like you make it easier.
Problem is that it also sets the underwater post process effect to that same level.
Edit: I made a different solution. I made a socket for the pelvis, and stored its Z value when touching the water.
Then I made a loop that checks the difference between the start of the Z value, to the current Z value.
When the difference reached a number which is above the target depth, the loop stops and executes Start Swimming.
@@OzarksVHS Thanks to both of you!
Just a quick tip for everyone asking about animations: Mixamo offers a "treading water" that's a good idle, and using their sliders system you can take their standard swimming animation and save it as various speeds.
Thanks. It works.
For those having problems with the character floating over the land on exiting the water, this was a better solution for me:
Go into your water body blueprint. Scroll to 'collision presets', and change it from 'water body collisions' to 'custom'. Scroll down and set the collision responses manually to 'ignore', except for 'world dynamic', 'pawn' and 'physics body'. Set those to overlap.
Also if your character is jumping out of the water and then sinking: -
After your initial input/axis and then branch to true, add a 'Set Movement' node, and set it to 'swimming'. Then connect to the 'add movement input.
Then at the end of your Start Swimming function, add the 'set movement' node again, and set to swimming. Out of that node add a 'set gravity scale' node and set it to something like 20. This will keep your character from swimming out of the water, but it won't sink to the bottom either.
Don't forget to reset the gravity back to normal on stop swimming.
I also set and reset the capsule radius to smaller and found this helped some more with when the character transitions from water to land.
So I have done what you recommended and it is working pretty well. Thank you so much! One thing though, after making the gravity adjustment it did fix the swimming out of the water then falling back in. However, there is a bit of bobbing when you swim at the surface, and if you stop swimming at just the right moment, it sinks you down really fast. Any ideas on how to prevent this?
@@Ckinproduction
I have the same thing so far. It's not too bad so I was going to live with it, being a noob.
@@Ckinproduction
I know there are ways to know what angle your character is, which I'm sure would be part of the solution here but I don't know enough about it yet. If you can work out the angle and momentum of your character whilst swimming you might be able to solve it.
@@studiobaxter1242 I’m pretty new to UE. But I have been able to figure out most programming problems I have been faced with. So, hopefully I will find a fix. If you by chance find a solution, let me know. It would be much appreciated.
@@studiobaxter1242your solution works well. The character at least doesn’t come out of the water and fall back in there is just a very very slight amount of Bobbing and if you stop moving at just the right second the character drops way down in the water. But never leaves the swimming animation.
For those who have trouble about character sinking, that's because Launch Character will change character to falling state. Just Replace Launch Character with Add Movement Input and Set Movement Mode to swimming behind. And in stop swimming, Set Movement Mode back to walking
Thank you SO MUCH you saved me hours of research for something so simple lol. How did you end up figuring this out?
I heart you.
"The animation is in the description!"
The Link In Description: a pack of 2,548 animations with no distinct names.
For any folks just interested in what animations relate its the ones labeled 125_XX up to 126_XX.
Bro it's one animation in an open license. Would it have been that hard to take the one you got, export to fbx from unreal and plop it in in any of thousands of file uploading websites available? Welp, thanks for the link to free mocap I guess. Still the laziest thing i've ever seen in my life. Buh eh you got some quick easy content out of this one! 20 minutes out of a 5 minute implementation is pretty impressive.
he is literally giving out 2500 animations for literally free and you complain about it? you HAVE to be joing fr
@xtynger1236 He's not giving anyone anything. The animations are a free pack someone else made, someone else packaged and distributed. I'm not complaining about how it was packaged, I'm criticizing the youtubers delivery of information.
I mean my comment doesn't really even make sense outside the context of this tutorial. The lacking names is really only a problem when you need the specific ones he uses here. Without those it's kinda annoying to dig through over 2000+ animations when you only want like 3.
thanks for the name files but there is a txt file with description..
As an improvement you could use a dedicated collision to check the overlap with the water, maybe at the chest or shoulders level.
Would love an updated version of this tutorial where you optimize certain features, no more jittering, smoother swim to run transition when coming out of the water. Also i have a bug where if i jump into the water & hit the bottom of the landscape my character just disapears & im forced to restart the game ;( Love this tutorial tho, thank u so much & hoping to see more ;)
I had jittering (looked like character was having a fit!) on both swimming AND treading water, I found that setting the "Update Overlaps" flag on the "Set Capsule Half Height" node at the end in the StopSwimming event seems to have fixed it (touch wood) for now! His "infinite loop" error that he didn't explain WHY he turned off the overlap update is possibly due to resetting the capsule height then causing another Begin (or End) Overlap event to be generated!?
This tutorial is awesome! I had the same issue as other viewers with the character sinking after getting into the water. I found that in the Character BP, after you set IsSwimming to true, drag a Set Movement Mode node and change the New Movement Mode to "Swimming." And after you set IsSwimming to false, drag a Set Movement Mode node and change the New Movement Mode back to "Walking." This fixed the issue for me.
thank you!! Im glad you found it helpfull and managed to get a fix around the issue
Thank you so much for this! One thing: If you put the Set Movement Mode after the IsSwimming and it's still not working, try putting the nodes right after the Start Swimming/Stop Swimming even, it worked for me. Cheers everyone 🍺
@@JustMe-bx1iv Can you tell exactly where to apply this fix
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
Amazing tutorial, exactly what I needed, thank you!
Could you please explain how to set the IK rig? I see here in the comments you suggest to set the Alpha to 0 in EventGraph, but I wasn't able to do it...
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
The best ue5 tutorials!
Thank you!! I really appreciate it!!
I have been waiting for this m8 thank you
Thank you!!
I can not see a swimming animation in the animation pack, just all the numbers like 125_01 How did you get the swimming animation??
Gorka I'm swimming before I reach the ocean. What can I do to fix that? Aside from me swimming on land It works great
Can this be updated for UE5.4? It has a different movement input system where it uses a singular enhanced input action and it doesn't have a singular axis value.
I found a kind of a workaround to this specific issue.
But now I have another problem: When I connect the actor begin overlap node to another node (exec), my water is invisible. If I don't touch the blueprint and leave it empty, water works normally.
There is 2 movement inputs in the character blurprint. there is left/right and forward/backwards. I was confused for days. Its in the same string from inputs. You want to spice in at the forward/backwards section. Its after the second (add movement input) add your branch there.i would show a screenshot but cant. Let me know if i can help. I feel ya bro it took days to figure out
Its at 3:58 is forward/backwards is on top and left/right is below it. Then use the vector that is going into (add movement) into your branched one. Im using 5.4 so i kniw what your looking at. Hope it helps
@@tylergerhart4806 Have you found a solution for the disappearing water?
someone said to move one of the spline points and that works for me.
Yeah sometimes you have to force a update by moving a a spline. Did you figure it out?
so question.... everytime i've attempted to use a players physics volume in a replicated setting whenever the host swims it forces everyone to swim. Whats the workaround for this?
5:40 when I try to turn the ocean into a blueprint, it always creates a strange edge out the outer limits between where my terrain ends and the expanse of water beyond the level geometry begins.
Love the Saturday tutorials, keep up the great work 👍
Thank you!! Yeah normally the saturday tutorials are cooler as I have more time!
what did i do wrong? at 6:57 wen u show your player walking into water, i am walkin on it..
Same problem, did you find a solution yet?
@proyectoparaland1840 nah bro I ended up getting fluidflux
@@tokyohthegoat Is it easy to implement? I mean when u had already a lot of things on character blueprint
Change the collision for the water body to overlap pawn. Pawn is the player collision, so you can change that (and camera)
change the collision preset to no collision
In the event graph of the anim (or in general really) why not drag in the movement component and use the Is Swimming? It prevents the need for a cast to the 3rd person character blueprint. Seems to be working ok for me.
This method will not work with multiplayer because it affects all the characters in world. So no matter where the character is they will start swimming since we are Changing overlapping physics volume
What's your idea for this then?
The animation pack uses numbers. What number was the swimming anim?
I'm so happy because I find your Chanel, I from Ukraine, I love your content;)
Thank you so much!! I really appreciate it! Love to see people from all parts of the world
So I have a custom character imported from CC4, and every time I retarget the animation, it goes wonky.
Are you retargeting it with the new UE5 features?
Thanks for this tutorial, swimming at last made easy! Can't get it working for the custom water body, doesn't respond to the overlapping events. Any tips?
Hey @gorkagames can you please show how to make the swimming system with replication in mind?
Soo the only way to have a character swim is to use code? There is no check box in the character movement component?
The animations you can download don't work. The BVH files cannot be opened or converted. :(
If I’m in UE 5.1 what do I need to change?
Hi,
Thank you for this tutorial. it has been very helpful. However, i am stuck at the swimming animation retargeting. After retargeting the animation (imported from mixamo), the swimming action is distorted and the mannequin floats intead. I am unable to find a solution online. Please help.
When I swim up to the surace of the water I go back to walking for a second and slightly launched out of the water, but when I go back into the water and back to swimming, I drop all the way down to the ground at the bottom of the water (as if effected by normal gravity, not the swimming/water lightweight effect). Id there a way to fix this or did I do something wrong?
Hi, so first of all try this, in the start swimming event, on the Launch Character node, make the force multiplier a ver very small number, like 0.1. 8:56 , this will probably solve the issue of launching the character. Then about the player dropping to the bottom, try to change the gravity scale when we start swimming, using the "Set Gravity Scale" node. Let me know if this helps!!
@@GorkaGames The gravity scale idea worked great, and I fall much slower, but I still sink all the way to the bottom after I jump out of the water. It seems like it doesn't start the swimming animations or controls when I fall into the water (from a tall height or just jumping out of the water and then back in).
Also, I continuously get this error while playing:
Blueprint Runtime Error: "Accessed None trying to read property BP Third Person Character". Node: *Set isSwimming* Graph: *EventGraph* Function: *Execute Ubergraph ABP Manny* Blueprint: *ABP Manny*
Do you know what could be causing this?
[When I click on any of the errored things it brings me to the part from 14:45 from the video]
why isn't it working in my engine?🥲... When I retargeted it, the ue5 manny kinda merged with the floor. And in the ue4 manny animation the feet were not moving as well... Am I the only one facing this? How should I get rid of it?
My movement input is completely different than yours mine has EnchancedInputAction IA_Move in stead of InputAxis Move Foward/ Backward
yeah that`s because you are in 5.1. but it is the same process, but now on separate axis basically
this has messed me up, at first I plugged to y value and so I went back and fixed it. but I'm still walking on water instead of in it.
@@tokyohthegoat You need to set the collision of the water blueprint to OverlapAll in Class Defaults.
Have you solved this problem? I don't understand the new enhanced input system for this tutorial. Please if anyone can get back to me
Wanted to start out by saying this has been the easiest tutorial I have found for swimming on TH-cam as well as the forums. It works MOSTLY as it should. With that said, I am struggling with the same issue someone else in the comments had where if you go up to the surface you immediately sink down. I tried fiddling with gravity and the force values but they don't seem to effect it immedietly sinking down. It seems like a quick fix but how exactly can I stop that from happening?
Hmm.. Try to add a small delay when you call the "Stop Swimming" event. It might be that it desables the water volume trigger too quick and the character`s capsule might be slightly under the ground, so it sinks.
@@GorkaGames The delay in theory works, but it applies to every time they leave the water. And I cant find a good balance on how long to make the delay. For example: if I make it too short, it still applies normal gravity when I leave the water in most instances. If I make it too long, it fixes the other issue but now makes the player fly for that amount of delay when leaving the water.
@@GorkaGames So I am not sure how to fix it, especially because I have bigger waves.
@@starmangalaxyyy1710 Same here. When we reach top of water and can't stand up the Player should stick to top of the water, shut off underwater sound, and be able to swim on top of the Gerstner Waves with a buoyancy like a boat until we tip controller down past a certain angle then we would dive. I just don't know how to code it and have found no info on it yet sadly. Would be forever grateful for a tutorial on that...wink wink 🙂🙂
@@starmangalaxyyy1710 Exactly where to add this delay can you please tell
I’m having the trouble of whenever I get into water the only way to move is with the an and d keys, how do I fix this?
hi @GorkaGames nice tutorial, but i need activate the control rig and locomotion. My character is swimming perfect, but the legs animation is broken. How i can activate control rig for swimming?
Same issue, and I only got the results I wanted by breaking the foot IK that he showed us at 9:53, but I'd like to have both 😅
I am working in 5.0 It is not showing My Blueprint where I can have variables . it is only showing components. how do I fix this?
for your swimming animation do you know the file name for it because I found 3 under the name swimming and they are all different and my legs do not work so If you know a fix to that it would be greatly appriciated
Looks like 126_03. That's the closest I could find
when I create the blueprint for the water, the water disappears. Help please.
move one of the spline points or the entire water body once to refresh it and your water will return
@@studentnj I had this exact problem and moving a spline did the trick. Thank you so much!
@@studentnj thank you so much you genius
Hey, great Tutorial but my character just walks on top of the water, any idea why? I'm using 5.4 btw
How would you "fill" an area with water with a water body custom. Just add in the physics volume separately, or am I just missing a feature in the water body custom details
BlendSpace1D is deprecated in UE5.2 (maybe from 5.1 onwards?) just use Blend Space node! Also found that on my ABP_Manny event graph (when running the game) I had to do a "IsValid?" node on the BP Third Person Character (in the "Then 3" sequence he added to the "Event Blueprint Update Animation" as I got LOTS of "object is none" errors all the time when trying to set the isSwimming variable! Adding that fixed it, and seems to work ok!
what if im using my own water simulation and want to use a physics volume that when colliding with player starts the swim?
I was wondering is there away to make water balloons you can throw and water cannons you can spray other characters
Good idea, there are a lot of methods to do this. I guess the most convivient way to do this is to join Niagara with Projectiles. I will see of I can make a tutorial on that!
@@GorkaGames That would be really great man thanks
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
No mater what i do i cant start swimming untill he character touches the ground. Help?
How do you import the animations? I've downloaded the Zip and have no clue how to add it.
Yeah so just extract the zip into a folder, and then just drag it into the content browser in UE5, and select the UE4 manequin skeleton
Gone back to trying it and it says that the animations can't be downloaded because they're a uasset
@@wawawalker drag it directly into the project folder itself, if you havent figured this out in a month.... if you did hopefully this comment will help some one in the future.
@@PolyPixxel thank you this helped. However, the animations are just t-posing. I've tried using the UE4 mannequin skeleton and retargeting but nothing :(
Everything worked but i ran Into a problem, when I enter the water and i look down with my character, the underwater rendering disappears and then it doesnt look like that i am underwater, and when i Look upwards again, the underwater Color appears again. I tried some things but nothing worked. Can you help?
Super cool !
Can you make spiderman 2 walk on wall?
Thanks! Yeah good idea, that would be cool to do. I will note the idea down
Does anyone know how to fix the problem when you try to go into the water but instead you are just standing on top of it almost as if it is completely solid?
It happens to me too, did you find a solution?
Click on the plane of water and look in the details panel for collision preset and set it to no collision.
Sure, when u start project you've got an error, only what u have to do is to click the hyperlink "add to .ini" or something like this
when i get the animation it says assign a skeleton to it but when i do it's just a T-pose any solution ?
what animation from the pack did you use
in the pack the animation I believe its between 117 and 118
I can't get it to work with 5.1. It uses the Enhanced input action IA_move
My character just sinks immediately. I tried all the fixes in the comments here and nothing is changing. I always have to jump to activate swimming. As soon as I do anything else with my character other than move forward/backwards, it sinks again. What in the world is going on here? I'm on 5.2 and I really want to make a full swimming system for my game.
when i swim in water the water on top is still there bout i can see though the whole bottom through ocean why is it doing that
How do you prevent character from jumping out of the water when u swim up ?
If anyone getting the problem in which the system shows that the character is already in water even you are ar surface . It is because you have collision boxes in your player bp. To fix that create a custom collision object channel for the collision boxes and set that ignore in collision settings of water bp
something with the overlap is wonky for me. if i do on actor begin overlap the is swimming Boolean is permanently true. if i do component begin overlap it just doesn't work.
Figured it out. I have a few sphere collisions around my player for other mechanics in the game. Those collisions were causing the ocean underneath the landscape to trigger the overlap event
how do you stop a character from swimming inside an underwater building? no one on the internet seems to know how to do this
Wouldn't you just make a trigger volume and use it to trigger the stop swimming functions?
Ue 5.3. Making same things, but somewhy can't dive. First person sample
Thank you for the explanation! I'd like to make my own swimming animation, since all I've find seem to be flawed someway, could you please tell me how or link a video?
I've made one animation, the preview seems ok, but when I hit play the legs keep vertical, do you know how to fix this? Also, any guide on making animations?
Amazing tutorial as always
Ah yes, gorka saving my Butt once again😂
Hii, I tried this tutorial, but unfortunately, none of it is working. I tried checking if i missed something, but i couldn't figure out what was the issue, can someone help me ?
so wen i went back, i realized i pluged in the x axis as apposed to y. went back and fixed this but nothing changed. i am still walking on water instead of in it
...and on top of that now I can't move left or right. so I guess I did it right the first time. but character is stuck on water plane.
having a issue where the swim animation starts playing as soon as the user touches the water but it's shallow water so it's showing the swimming animation above the water. How can this be fixed? Also do you more details on the IK rig setup for swimming that you mentioned in the video?
Yeah, so the animation has basically an offset from the pivot (floor), so that`s why it`s "floating". you could edit the animation on blender, or even better, use the "add offset" node to the character`s mesh when you are swimming. About the IK Rig, you can set the "Alpha" value to 0 when you are swimming, and then back to 1 when in land. You can do this from the animator`s event graph
@@GorkaGames for the offset node which blueprint do I add that in? the players or the animation?
@@730wavy the offset node would be added on the Third Person Charcater Blueprint
wr will get the animation of swimming plzz help here
Great tutorial! Any way that when the character is swimming near the water surface it snaps the swimming animation to the surface? Cant seem to figure it out. Im on ue5.1
Also i would love to know how to make it so you go into the water up to the stomach and then stop swimming and likewise backwards! If you could endulge me
How do I swim up and down?
Thank you so much for this! You are one of 3 tutorial creators on TH-cam that are understandable for me and make things function :)
All works well with swimming now, but one thing left:
At 15:30 you say you can go up and down. I can't. How do you do so?
Could you help? when i have to go in the waterbodyocean blueprint and call the function"start swimming" i doesn't appear as a function i can call, in fact it doesn't appear at all, help please?
Is there a way to integrate this with Fluid Flux?
Seems to reset any wave action you had going on in 5.2 might want to jot those down before you get too far ahead (l lost my wave source (Gerstner waves) and the water got real still. Also you can avoid the cast if you store the info that you walked into the water in a material parameter collection. Then do the stuff about being in the water directly in your character BP instead. It also means that if you switch playable characters it doesn't break. Better perf, more expandable, same number of steps. Yay. Super helpful for getting me the skeleton of it though thanks mate.
hey what do ya mean by the jump force like where is that
its when we enter in the water to swim we add a tiny jump force to make a nice transition from walking to swimming. If not the transition would not occur smoothly
So how do I fix it it
@@Fanofelement92 when we made the event to enter in swim mode, when we add the impulse
@@GorkaGames ohhhh the launch force right?
@@GorkaGames I fix it. Thank you and are you going to do a tutorial on flying
Very Dope and Informative
Is there a way to make NPC walk and roam around randomly like GTA V?
Difficult question
Thanks! Yeah so all you need is an MoveTo node, and then there's actually a node called "Get Random Point in Navigable Radius", and it will pick a random point in the nav mesh, making the AI roam around randomly like in GTA. You will also need a "NavMesh Bounds Volume" in your scene of course. I have an enemy AI tutorial that covers some of this, except the part of the random roam, but take a look into it: th-cam.com/video/xm-7m5Fw1HU/w-d-xo.html
@@GorkaGames Thank You!
The name of the animation is 126_05
will there be a breathing system added to the swimming system
Yeah so I have in mind expanding this system in the future, adding an oxygen system etc
@@GorkaGames that good to hear looking forward to other video you post.
can you make tutorial on how to make player die when it will be underwater too long and dont have oxygen any more
Mobiles don't support Water plugin. So how to create this system based on custom water material
Tried it and i just walk into the water like usual, doesnt detect the water at all, just continues walking under water
did you make the ocean blueprint?
@@GorkaGames yes i did, then when everything worked shes just always swimming on land after I added it to the animation blueprint. i do have complicated animation data tables and blueprints
@@Rabbit14 could you send me some screenshots maybe through twitter?
@@GorkaGames yes ill message you tmrw on twitter. I believe I deleted all the logic and the blendspace as it was interferring with errors on build down. But I'll piece it back tmrw and then show you whats going on.
I have an issue where my character won't stop swimming when I exit the water. How do I fix this? I'm on 5.1 if it matters.
See my solution above.
Awesome
Thanks!!
I don't have a InputAxis Move Forward / Backward PLS HELP!!
In which UE version are you on?
@@GorkaGames UE5
I did all this and everything works. But 2 problems. When character enters water and goes into swimming animation the controls switch. Forward is now the D key. W and S do not do anything. The A key reverses direction. ??? Problem 2... I drop a new lake into the map and created the blueprint for it, and character just runs through it. No swimming animation. I'm using 5.1. Also when I get out of water and back on land the controls revert back to normal. Lol also the main state machine is showing a warning
seems if we are using 5.1 we are out of luck for help with this.
@@Masterbleu1 I'm sure it has something to do with the enhanced ai input system
@@Masterbleu1 I unhooked the x y axis target. I can now use w a s d to move forward lol. The mouse controls the direction I'm moving in.
@@bradennichols3154 any way I can get screen shot of the blueprint ?
@@BleuStLouis how I get u the pic?
Has anyone done swimming in lyra?
Doesn't work with Top Down characters alwell time to keep searching
UPDATED TUTORIAL: th-cam.com/video/g0lrmXWlfOU/w-d-xo.html for those having issues with the new enhanced input
Wooww.. Following this tutorial really messed up my level. I'd advise to save a Version before trying.
Thanks!
thank you for watching!!!
Anyone else have a problem with the character "sinking to the depths" of the ocean while swimming and then seemingly bouncing off the underside of the surface to the bottom again immediately if u use the standard player controller? :o(
what number is the swimming animation
LOOK in the 120-130 area
I literally cannot convert to UE% manequin :D My Unreal 5 keeps breaking after retargeting.
water surface tutorial ??? (swim)
cool
thanks!
why does my character stay on the water? I have collisions off
I also have this problem😢
you have to set the collisions to Overlap instead of turning it off
On my way, the character drop into the bottom of the lake and then start swim... that weird
it doesnt work for me
what exactly doesnt work?
tro bien le tuto omgé
I did everything correctly but when i hit play i get the error accessed none trying to read property sim. Does anybody know how to resolve this?
You waisted my time I dont have that movement inut stuff in my character blueprint
Bruh this only broke my left and right controls
Im having same issues did you find how to fix it as i can only move backwards and cant figure it out i just want it back to normal any help would be much appreciated
Someone send this link to New World devs ffs lol