How to Set Up Dynamic Water Physics and Boat Movement in Unity | Ship Buoyancy Tutorial

170,418
0
Published 2020-05-09
In this tutorial you'll learn how to set up boat movement and dynamic water physics in Unity.

Check out my devlogs:    • Multiplayer Pirate Game Devlogs  

⎯⎯⎯⎯⎯⎯

Catlike Coding's article about shader-based vertex manipulation and Gerstner waves: catlikecoding.com/unity/tutorials/flow/waves/

Discord server: tomweiland.net/discord
Support me on GitHub Sponsors: github.com/sponsors/tom-weiland
Support me on Ko-fi: tomweiland.net/kofi
GitHub: tomweiland.net/github
Website: tomweiland.net/

⎯⎯⎯⎯⎯⎯

In this buoyancy tutorial, we set up dynamic water physics and boat movement in Unity. We'll be making objects float and implementing physics based buoyancy for large objects like ships. While the core of the video is about buoyancy and flotation, setting up boat movement after watching this tutorial is as simple as applying a local forward force. Add some input-based rotational forces to the mix, and you've made a boat controller in Unity!

#UnityTutorial #WaterPhysics #Unity3D #Buoyancy #GameDev

"Interplanetary Forest" by Meydän is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
Artist: soundcloud.com/meydansound/

All Comments (21)
  • @tomweiland
    Several of you have asked about how I made the ship float in my game, so here's a tutorial! Let me know what you think 👇
  • @JamesOfToya
    Love how at the end you're told that's the wrong way to do it and if you want it done right, you're on your own with the link. 10/10 right there.
  • @NeatGames
    I love the way the water moves and looks with the lowpoly look!
  • @toluyole
    This was AMAZING! he didn't waste the first 5 minutes with some crazy long intro, and he does the steps quickly while still explaining it pretty well, I mean if your slow to understand stuff I guess this would be pretty complicated and you would've had to watch it in 0.5X speed, but still this tut was AMAZING !!!!! liked and maybe subscribed . . . I'm gonna tell my friends about this
  • @SnutiHQ
    Hi Tom! 👋 Thank you so much for making this quality tutorial! 🎉 We took part in the Brackey's game jam 2020.2 and made a sailing game using your physics setup as a basis for our work. Really simple and intuitive setup, which was easy to extend upon. We planned to replace the sine wave function with something more fancy, but it actually turned out so beautiful when we finished our ocean shader and the motion of the boats was nice that we decided to keep it that way. 🌊 (Will be soon posting a devlog referring to your tutorial 💪)
  • @sharkycat1096
    This is a great tutorial! I love how you show which script you are modifying, making it easy to understand and your voice is also easy to understand!
  • @rogeriocruz658
    What can I say except thanks! I saw some other tutorials online about this and they were all extremely heavy on my CPU. Using some other shaders and the floating points from your tutorial I was able to achieve what I wanted without stressing my CPU. Amazing content
  • @editingstuff575
    Dude, this is really good and informative. You definitely deserve more
  • @mattshu
    I love your style. Easy to comprehend as you code while speaking.
  • @Marcos10PT
    If you're finding it hard to understand everything on your first watch through and you're amazed by every commenter seemingly having absorbed the entire thing in one go, do not despair: I have years of experience and still had to do a lot of pausing and rewinding. Awesome tutorial by the way! Thank you so much for sharing ☺️
  • this video was so helpful, I havve not only learned how to make waves but also how to get variables from another script. Thank you so much!! amazing!
  • @tomasbenders922
    Not planning to use this any time soon, but damn that was a good and simple tutorial!
  • @onelonewolf2944
    Thank you for this utterly amazing tutorial. I learned what I wanted and you presented the information in a clear and concise format. Defenitely going to implement this floating into my game.
  • @RazixStyle
    Great video Tom! Cant wait for the next one
  • @mohitsethi99
    Your channel is treasure! Really good tutorials, keep it up!
  • @Quinthelas
    This has been very useful tutorial in two ways, I have been working on a floating object for a project and I wanted to have it keep moving up and down on the surface and then this tutorial also helped me to figure out how to mimic the movement of the waves in my water without having to try make them real waves.
  • Incredibly good tutorial, I was looking for simple arcade buoyancy and this did the job right away!
  • @eddu369
    dude, youre an absolute legend. looking forward to seeing your progress with this game:D ty
  • @waasar
    This is a great tutorial for quickly getting into the good stuff. Thanks!
  • @renatusdev
    Tom The Man! Thank you bro, using this immediately rn. You got a sub!