Collision 3D
3D collision/query fidelity: baked triangle-mesh geometry (slopes/loops/ledges) answering raycast / sphere+capsule sweep / ground-probe via World's IWorldQueries3D, alongside the analytic volumes. Ships as content (.mesh3d, CBK envelope) — zero wire. The client package carries the mesh->.mesh3d editor BAKER, the shared collision math, and a RUNTIME mirror (IClientMeshGeometry) that preloads the same bakes by Addressables label so prediction asks the identical triangles authority does — which is what lets a client predict a vehicle's height and slope per frame instead of receiving them at the ack rate.
Seams you implement 1
Crossplay calls these; your game supplies them. Each ships an inert or permissive default, so register yours before services.AddCrossplayCollision3D(); and it wins.
IWorldMeshGeometry game SPI
SPI the game (or the file loader) implements to give a zone its baked collision TriangleMesh — the mesh analogue of IWorldGeometry/IWorldBounds. Return the zone's mesh, or null when it has none. The BakedMeshGeometryProvider answers ray/sweep/ground against it. The default FileMeshGeometry loads baked .mesh3d files from Collision3DOptions.ContentPath; a game can register its own source instead (procedural levels, an asset pipeline). Reuse mesh instances — the provider may call this per query.
-
TriangleMesh MeshOf(string zone)The baked collision mesh of zone, or null when it has none.
Configuration 1
Every tunable lives in an options object — there are no magic numbers to hunt for.
Collision3DOptions
Configurable Collision3D parameters (defaults here, never inlined). The mesh provider is inert until a mesh source is composed — either baked .mesh3d files under ContentPath (the default FileMeshGeometry loader) or a game-registered IWorldMeshGeometry.
-
string ContentPath { get; set; }Directory the default loader reads baked collision meshes from (one <zoneId>.mesh3d per zone). Empty = no file loading (a game supplies meshes via its own IWorldMeshGeometry, or the provider stays inert — nothing throws). Mirrors WorldBoundsOptions.ContentPath.
Unity services you inject 1
Crossplay binds these in the client context. Inject and call them from your own MonoBehaviours and presenters.
IClientMeshGeometry
The CLIENT's mirror of the baked 3D collision meshes — the twin of the server's IWorldMeshGeometry, and the client half of anything that has to agree with authority about solid geometry (a predicted vehicle's height, a local jump/landing, a camera that must not clip through a hill). It hands back the SAME TriangleMesh the server loaded, decoded from the same bake bytes through the same shared MeshBakeSerializer, so the two tiers can be asked identical questions through the shared MeshCollision math and cannot disagree. Absent (no options asset, no bake for a zone) every query answers null and callers degrade to whatever authority tells them — never to a guess.
-
TriangleMesh MeshOf(string zone)The baked collision mesh for a zone (instance zones resolve through their template), or null when this client has none.