Hey Q!
Yes a BuoyancyForceComponent is what you will want to add as a child of the character mesh, but currently you do not need to activate it, it will automatically get applied. Come to think of it adding an ‘enabled’ boolean is a good idea. Looking over the code it is possible to use a “Set Component Tick Enabled” in blueprints on the component, should have the desired effect. I haven’t used it yet but setting up some kind system to auto-disable it shouldn’t be too difficult, easiest would probably be checking the players current location on the Z axis, when the character gets near the Z height of the just have it enable the component.
As far as the setup is concerned, here’s a couple screenshots of the ThirdPerson demo character in the project. For the bone overrides the second image shows all that are really required, you can add more bones if you want and adjust the values however you see fit. I’m planning on creating a new blueprint for the character that will have a swim setup similar to games like GTA5 and Assasins Creed Rogue where the character ‘snaps’, for lack of a better word, to the surface but if the camera rotate pitch is push forward long enough the character will start swimming beneath the surface. I just need some swimming animations built for the UE4 third person dude (if anyone is reading who knows how to create them, and would be willing to contribute them to project, we would forever be in your debt!) and I’ll add them in, will make sure to let you know if I can get an example working.
Here’s the screenshots:
Let me know if anything is unclear. Cheers!
