Skip to content

Components

WhistleWiz edited this page Sep 21, 2024 · 3 revisions

Car Changer provides a bunch of components to help you bring your changes to life. Here's a list of what they are and do.

Note

Using most of these components on bogies isn't currently supported. Only ExtraBrakeRenderer and PoweredAxle do, and in turn do not work anywhere else.

UseDefaultMaterial

Probably the most important, this allows you to use the default material of a car without having to include it with your mod. It also makes it work with skins.

Source Material

The material you want to use. You can find the list of supported materials of each car here.

Material Object Path

If the material isn't available through the Source Material dropdown, but it exists in the car, you can use this to specify a path to a transform with the material you want. Use RUE (Runtime Unity Editor) to check ingame where your object actually is.

FromInterior

If the path to the material should use the interior object instead of the main car object.

Generate Exploded Material Procedurally

In case the exploded variant of a material isn't available, you can use check this option to procedurally create that material from its corresponding "normal" version.

SwapMaterialOnExplosion

Swaps the material of objects on explosion.

Material

A custom material. If not set, then Source Material will be used.

Source Material, Material Object Path, Generate Exploded Material Procedurally

Refer to UseDefaultMaterial for usage.

AffectedGameObjects

The list of gameobjects whose renderers (including children) will swap to this material.

Note

Explosion related components only work in the Body and Interior LOD fields. If the object has a field for an exploded version, this won't work.

DisableGameObjectOnExplosion

Disables the GameObject it is on when the car explodes.

Note

Explosion related components only work in the Body and Interior LOD fields. If the object has a field for an exploded version, this won't work.

SwapGameObjectOnExplosion

Swaps the GameObject it is on with the one in Replace Prefab.

Note

Explosion related components only work in the Body and Interior LOD fields. If the object has a field for an exploded version, this won't work.

HideTransformsOnChange

This component can hide a list of transforms when the change is applied. You can use it in cases the option isn't provided by the mod, or with the extra flexibility provided by mods such as Locomotive Mesh Splitter.

Transform Paths

The path to the transforms. This component is context aware, so if on the body it is relative to the car root, if on the interactables or interior it's relative to the interior root.

Tip

You can use this on colliders to disable them.

MoveTransformsOnChange

Similar to the component above, but for moving transforms. Do not use this to move controls, or you may get unexpected results.

Position, Rotation, Scale

Alter the corresponding parameters of the transforms in the list.

Relative

If true, the previous transformations are applied to the original ones, otherwise they are set to the provided values. For example:

  • Original transform position: (0, 2, 1)
  • Position change: (0, 0, 1)
  • With relative:
    • Result: (0, 2, 2)
  • Without relative:
    • Result: (0, 0, 1)

Transform Paths

The path to the transforms. This component is context aware, so if on the body it is relative to the car root, if on the interactables or interior it's relative to the interior root.

TeleportPassthroughCollider

Makes a collider passthrough to the teleport arc (for example, railings). Only works on colliders in the Walkable group.

Two Sided

Wether the collider always blocks the teleport or only in 1 direction.

Other Colliders

???