Unity3D - Making Objects Float in an Ocean, and Making Ocean Waves (long version)

Channel:
Subscribers:
37,500
Published on ● Video Link: https://www.youtube.com/watch?v=y_Q47rA_wmA



Team Fortress 2
Game:
Duration: 3:05
27,734 views
101


After watching someone on Twitter tinker with a ocean waves + buoyancy system, I felt like making one too. (The person on Twitter was https://twitter.com/marmalade_tim - he does some pretty slick modelling and map design for Team Fortress 2. Give him a follow!)

(This is a longer video showing more detail than the other one at https://www.youtube.com/watch?v=F1AmgD058r0.)

WHAT THE SYSTEM CAN DO:

- Objects, when submerged, get forces applied to push them back to the surface. The deeper they are, the more force is applied. Velocity and angular velocity (ie rotation speed) are dampened every frame an object is in the water, to simulate fluid resistance.

- Waves push objects in the direction the wave is travelling, based on wave speed (ie wave frequency), and height of the wave at the given point (higher = more push, lower = less push).

- Waves can have their frequency, amplitude, wavelength, and source point changed dynamically.

- Many waves can be added together for more realistic + chaotic waves like seen in the ocean.

- The boats typically flip back up the right way. There's no hack there, just a very massive rigidbody added below the boat's centre of mass (seems making the rigidbody ~80% of the boat's mass works well for stability without sinking the boat). This simulates what real boats use to remain stable on turbulent waters, as far as my layperson knowledge goes.




Other Videos By nesis


2017-03-22How to Levitate Instead of Climbing into Lava - The Legend of Zelda: Breath of the Wild
2017-03-22How to Use a Yiga Blademaster to Escape a Guardian Stalker - The Legend of Zelda: Breath of the Wild
2017-03-20How to Ride a Guardian to Kill Bokoblins and Save the Day - The Legend of Zelda: Breath of the Wild
2017-03-20How to Roll Down a Hill - The Legend of Zelda: Breath of the Wild
2017-03-19How to Reflect Kill 3 Guardians Simultaneously - The Legend of Zelda: Breath of the Wild
2017-03-19[UNEDITED] How to Reflect Kill 3 Guardians Simultaneously - The Legend of Zelda: Breath of the Wild
2017-03-13Free Falling 3000 Feet Onto A Horse - The Legend of Zelda: Breath of the Wild
2017-03-12They Can't See You If You Don't Move - The Legend of Zelda: Breath of the Wild
2017-03-11Guardian Selfie Glitch - The Legend of Zelda: Breath of the Wild
2016-10-04Unreal Engine 4 Post Process Material for Painterly / Sketchy / Hand Drawn Effect
2014-10-05Unity3D - Making Objects Float in an Ocean, and Making Ocean Waves (long version)
2014-10-05Unity3D - Making Objects Float in an Ocean, and Making Ocean Waves
2013-08-16Puzzle game prototype using the Oculus Rift in Unity3D
2012-04-25Grasshopper Galapagos Tutorial
2012-04-01Making an Object Look at the Mouse
2012-04-01Changing the Mesh Used in a 3rd Person Character Controller in Unity3D
2012-04-01Importing an Animated Object in Unity3D
2012-03-20Rotate an Object Using the Mouse
2012-03-20Making a Character You Can Control in Unity3D (pre Unity 4.0.0f!)
2012-03-20Camera Control in Unity3D
2012-03-20Lighting a Scene in Unity3D



Tags:
Unity3d
Unity
game
design
programming
coding
ocean
ocean waves
wave simulation
buoyant
Buoyancy (Material)



Other Statistics

Team Fortress 2 Statistics For nesis

nesis presently has 37,133 views for Team Fortress 2 across 2 videos, with his channel publishing less than an hour of Team Fortress 2 content. This makes up 1.38% of the content that nesis has uploaded to YouTube.