×

nesis's video: Unity3D - Making Objects Float in an Ocean and Making Ocean Waves

@Unity3D - Making Objects Float in an Ocean, and Making Ocean Waves
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!) 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.

18

4
nesis
Subscribers
38.7K
Total Post
69
Total Views
12.4M
Avg. Views
199.9K
View Profile
This video was published on 2014-10-05 21:15:29 GMT by @nesis on Youtube. nesis has total 38.7K subscribers on Youtube and has a total of 69 video.This video has received 18 Likes which are lower than the average likes that nesis gets . @nesis receives an average views of 199.9K per video on Youtube.This video has received 4 comments which are lower than the average comments that nesis gets . Overall the views for this video was lower than the average for the profile.

Other post by @nesis