Web Update 19.10.2024

Configure a Spline for collisions

You are here:
Estimated reading time: 1 min

Tunnels, bridges, and other types of splines can interact with smoke particles by preventing penetration, which provides a more realistic effect. In order for this functionality to work as efficiently as possible, it is important to correctly configure spline assets.

This is generally done on a case-by-case basis and will depend on how the asset was built. If the spline contains several meshes then the most important thing is to only enable collision detection for the relevant meshes. For a tunnel, this means that the walls, roof and tunnel mouth are likely to be the only relevant meshes. Catenaries, tracks and other slim/flat objects will add little to no benefit and can generally be ignored. The same principles apply to other types of splines.

default – use game’s default value (in general “collated”, but can vary in specific cases)

disabled – completely discard this sub-mesh for collision data generation purposes. Causes the sub-mesh to be fully ignored for asset picking and physics simulation.

collated – the geometry of this sub-mesh will be added to that of the other sub-meshes selecting this option (within the asset), and one collision object will be generated for the resulting conglomerate.

separate-shape-convex-hull – this sub-mesh will generate its own individual collision object, as a convex hull.

separate-shape-triangle-mesh – this sub-mesh will generate its own individual collision object, as a triangle mesh. This is the most accurate option but also the most costly in terms of performance, only use when specifically needed.

kind                                    "track"
istrack                                 0 //for track
isroad                                  1 //for other spline
trainz-build                            4.6 
enable-pfx-collisions                   1

mesh-table
{
  wall
  {
    mesh                                "wall.trainzmesh"
    collision-data-generation-mode      "separate-shape-convex-hull"
  }
}
Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 7
Alpinetrainz
Logo
Shopping cart