{"id":13679318,"url":"https://github.com/dbrizov/NaughtyWaterBuoyancy","last_synced_at":"2025-04-29T18:32:01.369Z","repository":{"id":45551598,"uuid":"46291601","full_name":"dbrizov/NaughtyWaterBuoyancy","owner":"dbrizov","description":"Water Buoyancy Simulation for Unity","archived":false,"fork":false,"pushed_at":"2020-01-08T18:15:11.000Z","size":333,"stargazers_count":935,"open_issues_count":2,"forks_count":120,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-19T07:59:39.852Z","etag":null,"topics":["buoyancy","simulation","unity3d","water"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbrizov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-16T17:46:22.000Z","updated_at":"2025-04-17T13:30:32.000Z","dependencies_parsed_at":"2022-09-06T02:20:55.191Z","dependency_job_id":null,"html_url":"https://github.com/dbrizov/NaughtyWaterBuoyancy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyWaterBuoyancy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyWaterBuoyancy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyWaterBuoyancy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbrizov%2FNaughtyWaterBuoyancy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbrizov","download_url":"https://codeload.github.com/dbrizov/NaughtyWaterBuoyancy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251560067,"owners_count":21609134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buoyancy","simulation","unity3d","water"],"created_at":"2024-08-02T13:01:04.232Z","updated_at":"2025-04-29T18:32:01.041Z","avatar_url":"https://github.com/dbrizov.png","language":"C#","funding_links":[],"categories":["C#"],"sub_categories":[],"readme":"# NaughtyWaterBuoyancy\nWater Buoyancy Simulation for Unity Engine\n\n![gif](https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/water-buoyancy/idle.gif)\n![gif](https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/water-buoyancy/dive-in.gif)\n![screenshot](https://github.com/dbrizov/dbrizov.github.io/blob/master/images/project-images/water-buoyancy/surface-normal.png)\n\n## System Requirements\nUnity 2018.3.0 or later versions. Feel free to try older version\n\n## How To Setup\nYou can use the ready to go prefabs (**WaterPro_DayTime** and **WaterPro_NightTime**). \u003cbr\u003e\nThey are both located in the Prefabs folder. The only difference between the two\nis that they use different shaders for daylight and moonlight. \u003cbr\u003e\n\nThe two important scripts are **WaterVolume.cs** and **FloatingObject.cs**. \u003cbr\u003e\nThe water volume applies buoyancy forces only to floating objects.\nThe water volume needs to have a tag **Water Volume** in order for the floating objects to detect collisions with the water.\nThe floating is just like in real life physics. If an object has density lesser than\nthe density of the water, it will float. If an object has greater density than that of the water, it will sink.\nIf for example an object has density equal to half the density of the water, then the object will submerge exactly half of its volume.\nThe other half of the volume will be above the water. For more info see this [Buoyancy Reference](http://scienceprimer.com/buoyancy) \u003cbr\u003e\n\nThe **WaterVolume.cs** script works only with the procedural Mesh in the project due to performance optimizations.\n\n## License\nThe MIT License (MIT)\n\nCopyright (c) 2015 Denis Rizov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrizov%2FNaughtyWaterBuoyancy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbrizov%2FNaughtyWaterBuoyancy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbrizov%2FNaughtyWaterBuoyancy/lists"}