Log inGet started
Package

collision.module

Newest version

README.md

collision

Abyssal Garden's collision proxy. bake() builds one static triangle mesh standing in for everything solid the abyssal.abyssal render feature draws (the seabed's density field meshed again on a 1.5 m grid, the whale fluke and the ship as drawn, and a 20-triangle hull for each boulder, large rock chunk and sponge) and saves it as the mesh abyssal.seafloor_collision; a rebake rewrites that mesh's geometry and keeps its guid. The scene's Collision entity carries it in an exact MeshCollider, which is what the diver swims against.

Run it from an engine whose render feature has finished generating, since the placed solids are read back from the feature's buffers: require("abyssal.collision").bake(). It answers the triangle counts it wrote.