Skip to main content

Contact

Client-only. Foam where things cross the water: the FFT sea foams around every pillar, hull, rock and buoy standing in it, in its own surface.

A slow scan (a few times a second) finds the parts the water actually passes through near the camera and hands them to the FFT surface as foam masks (Spectral.SetAutoFoam). The foam is then vertex foam in the water mesh, lit like the rest of the sea, and it joins the part it touches: no separate objects, particles or textures move about on top of the water.

Only the FFT sea does this (WaveMode = FFT): the Gerstner sea's 8 stud mesh cannot draw a foam ring that small, so it has none.

Left out on purpose: parts wider than MAX_EXTENT (islands, the seafloor slab), invisible parts, characters, and a part the water does not reach (a deck above the swell). Opt a part or model out with the attribute OceanContactFoam = false.

Functions​

SetSuspended​

Contact.SetSuspended(on: boolean) → ()

The renderer's adaptive quality switches the foam off while it is saving frames.

Show raw api
{
    "functions": [
        {
            "name": "SetSuspended",
            "desc": "The renderer's adaptive quality switches the foam off while it is saving frames.",
            "params": [
                {
                    "name": "on",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 121,
                "path": "packages/src/Ocean/Contact.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Contact",
    "desc": "Client-only. Foam where things cross the water: the FFT sea foams around every pillar, hull, rock and\nbuoy standing in it, in its own surface.\n\nA slow scan (a few times a second) finds the parts the water actually passes through near the camera and\nhands them to the FFT surface as foam masks (Spectral.SetAutoFoam). The foam is then vertex foam in the\nwater mesh, lit like the rest of the sea, and it joins the part it touches: no separate objects, particles\nor textures move about on top of the water.\n\nOnly the FFT sea does this (WaveMode = FFT): the Gerstner sea's 8 stud mesh cannot draw a foam ring that\nsmall, so it has none.\n\nLeft out on purpose: parts wider than MAX_EXTENT (islands, the seafloor slab), invisible parts, characters,\nand a part the water does not reach (a deck above the swell). Opt a part or model out with the attribute\nOceanContactFoam = false.",
    "source": {
        "line": 19,
        "path": "packages/src/Ocean/Contact.luau"
    }
}