-
Notifications
You must be signed in to change notification settings - Fork 6
Bogies
A car in Derail Valley must always have 2 bogies.
If you do not want to use custom bogies, all you need to do is position them in the correct locations.
If you do want to use your own custom bogies, select the Custom
option in the car livery, and follow the structure and instructions outlined in the rest of this page.
Wheel radii for vanilla bogies
- Default: 0.459m
- DE2: 0.5025m
- DE6: 0.5335m
- DH4: 0.535m
- DM3: 0.536m
- S060: 0.712m
- S282: 0.712m
- Front axle: 0.355m
- Rear axle: 0.575m
- Handcar: 0.290m
- Microshunter: 0.325m
Vanilla bogie models
The small rectangle indicates the pivot of the bogie only, it is not part of the model.
Default | DH4 | DE6 |
---|---|---|
![]() |
![]() |
![]() |
DE2 | Handcar Front | Handcar Rear |
![]() |
![]() |
![]() |
S282 Front | S282 Rear | Microshunter |
![]() |
![]() |
![]() |
The S282's bogies are very offset from the centre and include extra, invisible axles. You are encouraged to not use them. If you want to use those models, you can instead make use of Grabbers.
Note
If you're using vanilla bogies other than the default, don't forget to adjust the wheel size or the rotation will look wrong.
- BogieF
- bogie_car
- [axle]
- bogie2brakes
- Bogie2BrakePads
- Other meshes part of the bogie structure
- bogie_car
The top transform must be named BogieF or BogieR. The single child must be named bogie_car (to be detected by the TrainCar script in-game). If your custom bogie needs to be moved up or down, bogie_car can be adjusted in the y axis (only move BogieF and BogieR in the z axis).
* The meshes in this example can be replaced with multiple different transforms for each LOD, and controlled with a LODGroup component on bogie_car.
Example setup for a custom bogie with 3 axles
Important
The base transforms BogieF and BogieR must stay at y = 0
but can be moved along the Z axis.
Important
Keep the names BogieF and BogieR so they can be properly replaced in-game.
Your bogie can have any number of axles. They must all have the name [axle]
to be detected properly.
This is the transform that rotates as your car moves. The actual meshes for your axles should be children of this GameObject.
This GameObject should have the mesh for the brake pads. If you want/need to have multiple meshes, you can put them as children of this GameObject, and they will all be treated as brake pads.
Following the bogie structure from above, brake glows are automatically setup. However, that may not be enough on certain occasions. For those situations, you can add the ExtraBrakeRenderers
component to the root of the prefab, and assign any number of mesh renderers you also want to glow to it.
If you want to make the brake pads glow with custom colours, you can assign the CustomBrakeGlow
component to the root of the prefab too. The gradient should start at black with 0 intensity to correctly display.
Important
The material used for brake pads needs both the Emission
and Enable GPU Instancing
properties set to true, and Global Illumination
set to none.
It is safe to share the same material with the rest of the bogie (bogie parts and axles).
The colliders on bogies are 2 capsules under the [colliders] GameObject. Check the colliders page for more information about proper setup.
All cars in Derail Valley can produce wheel sparks (for example, braking too hard during the rain, causing the wheels to slide). CCL will automatically set them up for you in most cases (using default bogies, or custom bogies following the standard structure). If you are using non standard wheel setups, you can add a WheelSlideSparksControllerProxy
component to any object in the prefab (we recommend creating a new object named [wheel sparks]
, and adding the component to it, to match the vanilla structure).
Now, you can add GameObjects to any place where you want wheel sparks, not just on the bogies. This can be used to add sparks for wheels on the locomotive frame itself like the S282, S060 or DM3. If you click Auto Setup
in the component, CCL will find all axles in your bogies and add contact points for the sparks automatically.
To have powered wheels you should include the PoweredWheelsManagerProxy
component in your prefab. In this component, you should link the axle transforms of your wheels, visible or invisible (if they're animation driven as outlined below).
Those transforms will in turn need a PoweredWheelsProxy
component.
Important
To have powered wheels you need a simulation on your car.
Important
Get Wheels From Default Bogies will only work on default bogies that are powered.
If you want to use wheels that are not part of bogies, please follow the instructions in this page.
Even if they are not part of the bogies themselves, you should still have an empty [axle] GameObject at their position, for a more accurate physics simulation. As an example, the DM3 has 2 invisible bogies, with 2 axles matching the wheel positions in the front bogie, and another axle in the rear bogie.