Spline Mesher Documentation

Spline Mesher

Spline Mesher
Version: 1.2.1
Review

3.2.Spline Mesher component #

This component is a front-end for deforming a mesh along a spline. It holds all the various settings that control the mesh generation output. Which it outputs to a Mesh Filter component on the assigned Output Object.

All the parameters have tooltips to explain their function. Which is why they aren’t covered here.

Mouse over to view them (outside Play mode)

Mark the output GameObject as “Static” if you need lightmap UV’s generated for it.

Input/Output

Input: At the very least a Spline Container component reference must be assigned. This specifies for which spline the mesh must be created.

Output: The object where the generated spline mesh gets assigned to. This must be an object with a Mesh Filter and Mesh Renderer component.

Collider

Here you can enable the generation of a collider mesh.

The “Box” type creates a box mesh that fits around the input mesh.

Using a custom collider mesh is almost always the best.

For example, a fence may benefit from a rounded top, so players can’t stand on them and slide off. A sidewalk may need sloped sides, so characters can smoothly walk up them.

Distribution

Generally, a mesh is repeated and X number of times along the spline. As many times as it fits.

Deforming

Controls aspects of how the mesh is deformed along the spline.

The “Offset” parameter is most useful for creating multiple meshes along a shared spline. For example, guard rails next to a road.

Conforming

This remaps the spline’s sampled position to the geometry underneath it though raycasts. For instance, snapping a fence to the curvature of a terrain.

Events

It’s possible to call functions from other scripts, either before the mesh is being rebuild and/or after.

For example, you may want to update other aspects of your workflow once a mesh is finished rebuilding. For example, if a fence makes up an enclosure for animals, you may want to update a navmesh after it has been changed.

See the Scripting section for more details.

Yes No Suggest edit
Last updated on October 15, 2024
0 of 0 users found this section helpful
Suggest Edit