"Unity Notes" float objects (boats) on the water-buoyancy

Source: Internet
Author: User

See a discussion in the official forum about how to float an object on the water: https://forum.unity3d.com/threads/floating-a-object-on-water.31671/

Water power system Plug-in:

    • https://www.assetstore.unity3d.com/cn/#!/content/10382

In addition, we can refer to the bootcamp plug-in for the tail ripples generated by the vessel movement, using particle effects.

The simplest and lowest cost approach:

Detect object Height (Y-axis) in update, enable gravity above water surface height, or disable gravity.

void Update () {    if0.5f)    {        gameobjectfalse;    }     Else     {        gameobjecttrue;    }     if 0.4f )    {         0.5f;    }}

Unity notes Float Objects (boats) on water-buoyancy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.