Cockpit and Dashboard Setup

The dashboard is not part of the main bus mesh to make reusing the dashboard easier between buses of the same line. All buttons, levers, dials and other moveable dashboard elements are weighted to a bone that can be moved in game.

Mesh Setup

Everything that can move in the dashboard (Button, Dial, Needles) has its own bone that will be manipulated ingame.

Full dashboard bone setup with bones for every button dial and needle

 

Every button/switch should be weighted to the bone. The bone should be in the center of the button for easier movement and rotation ingame.

 

 

 

Door buttons

If you want to reuse the same dashboard blueprint in multiple buses and those buses have a different count of doors, we recommend to not add any visuals to the door button bones and spawn the door button visuals on runtime. Add bones for the maximum number of door buttons necessary in you dashboard. For unreal to detect if the user interacts with a bone directly it needs to have some geometry weight painted to it. As the door buttons are not visible in this case we added some very basic geometry to the door bones that are never visible.

 

 

 

 

 

 

 

 

Bone Names

  • SteeringWheel

  • Seat

  • Combo_Base (These could change depending on the dashboard)

    • Combo_Wiper

      • Combo_Horn

  • Retarder_Base (these could change depending on the dashboard)

    • Retarder_Button

  • BrakeLever

  • Key

  • Door_01 (02, 03, etc)

  • Switch_01 (02, 03, etc)

  • Blower_01 (02, 03, etc)

  • Dial_Lights (could be different names here depending on dash. Lights, Ignition, etc, this works for anything on a dial)

  • Button_Engine_R

  • Button_Engine_D

  • Button_Engine_N

  • Speed (name should fit the needle/gauge)

  • Fuel (name should fit the needle/gauge)

  • RPM (name should fit the needle/gauge)

  • Heat (name should fit the needle/gauge)

  • Battery (name should fit the needle/gauge)

Physics Asset Setup

All interactable buttons need to have a collider setup in the Physics asset of the dashboard mesh so they are clickable in the game.

 

 

 

 

 

 

Create colliders with the Tools window

There are a lot of small colliders you need to place, but you can fortunately use a tool to automatically create most of them.
Open the “Tools” window in the Physics Asset Editor (Windows -> Tools)

This opens a small window which lets you automatically generate most of the physics bodies we need.

Select one or multiple bones in the skeleton, select the primitive type that most fits the interactable you selected and click “Add Bodies”. This will create a collision body of the selected type which fully covers the space of the submesh weighted to the selected bone. This will not work correctly if there are no vertices painted to a bone, in addition buttons will also only be interactable if there are verticies painted to the bone.
Don’t forget to add a collider to the driver seat. Unreal uses the colliders to calculate the bounds of a mesh for visibility and only shows the mesh if bounds of a mesh are in view.

Animation Blueprint Setup

The animation blueprint of the dashboard can be created by right clicking the dashboard skeletal mesh in the content browser and selecting Create -> Animation Blueprint
In the animation blueprints you will need to setup a couple nodes.

 

Button animation handler: AnimGraphNode_SkeletalMeshInteractible

This node will drive all button animations in the dashboard. It uses the data you setup in the dashboard blueprint to move the bones of the buttons, dials and other cockpit components.
Set the LOD Threshold of this node to 1. This causes the dashboard buttons to only be animated if a player is close enough to see it.

 

Speed needle and RPM needle: AnimGraphNode_SkeletalComponentRotator


Those two nodes are used to animate the speed and RPM needle, their setup is very similar to each other.

Variable Name

Explanation

Animation Type

Select the bus function this node should observer.

Speed Unit Type

Only considered, if the animation type is set to “Speed Gauge”. Choose KPH or MPH depending on your dashboard.

Bone Name

Set this to the bone the animation should affect.

Minimum Rotation

Default bone rotation offset if the input value is 0. Useful if you want to slightly adjust the initial bone rotation.

Maximum Rotation

Bone rotation if input value reaches the max observed value.

Max Observed Value

The value at which the maximum rotation should be reached.

Debug Input Value

Useful to check if the selected bone rotates to the correct position at a specific value. You need to recompile the animation blueprint after changing this value to see its effect.

LOD Threshold

The speed and RPM needles are very small thus the animation can be deactivated similarly to the dash buttons after LOD 1.

 

Steering wheel: AnimGraph_SkeletalComponentRotator

Variable Name

Explanation

Animation Type

Set the type to Steering Wheel.

Speed Unit Type

Ignored when set to Steering Wheel.

Bone Name

Name of the bone that should be rotated.

Minimum Rotation

Ignored when set to Steering Wheel.

Maximum Rotation

This is the maximum rotation in one direction. The steering wheel will rotate between minus and plus the maximum rotation.

Max Observed Value

Ignored when set to Steering Wheel.

Debug Input Value

Useful to check if the selected bone rotates to the correct position at a specific value. You need to recompile the animation blueprint after changing this value to see its effect.

LOD Threshold

Depending on the steering wheel it might be easier to see if it moves from a distance, you might only be able to deactivate the animation in LOD 3 if at all.

Layered Blend Per Bone


This node is used to blend the button animations with the bigger dashboard animations.

Add the bones that should be affected by the animation to the branch filters list of the layer.

Check the provided dashboard animation blueprint for reference

 

 

 

Blueprint Setup

All dashboard blueprints need to inherit from BPDashboardBaseClass:

  • you can either create a new blueprint and use this class as parent class

  • or duplicate an existing one from another bus folder.

  • make sure in the bus blueprint the Dashboard has the tag added "Dashboard"

 

 

 

Driver Hands On Steering wheel

Two things need to be setup for the driver hands to be on the steering wheel and for them to move with the rotation of the steering wheel:

  • The SteeringWheel_BP needs to be placed and scaled so that it overlaps with the actual steeringwheel of the bus. The white spheres are the points the driver will hold on to. When the steering wheel rotates they will select the closest sphere to hold onto and interpolate between them accordingly. We normally place the blueprint so that the resting hand positions are on the bottom of the steering wheel.

  • The SteeringWheel_HandPositions_BP needs be placed on the the left side of the steering wheel. This blueprint gives a small preview of how the driver hands will be rotated depending on the position of their active grab point. All positions will be mirrored for the right hand.

 

Additional Cockpit Elements

Two cockpit elements can be placed in the cockpit where they fit, the GPS screen and the Radio. Make sure they are accessible and visible to the player.

Testing

Make sure your bus uses the correct dashboard. Once your bus has been placed in the scene you should be able to test your cockpit:

  • can all buttons be interacted with? An easy way to see all interactibles is to activate the cockpit zoom and check the button hints.

    • if a button is not interact-able make sure that the bone has some geometry weight painted to it and that a collider is setup for it in the physics asset

  • does the driver correctly grab onto the steeringwheel? Go into third person and look at the dashboard. You should see the hand movements when you turn the steering wheel.

Next Steps

Steering and Driving