Speed UI

Space Combat Kit

To display the speed of a spaceship on the UI:

  1. Add a HUD Speed Display Controller component somewhere on the vehicle

  2. Set the Engines field to the vehicle's Vehicle Engines 3D component and set the Rigidbody too

  3. Create an Image for the speed bar and make sure its Image Type > Fill Method is set to Filled (you will need to add a sprite of some kind to the Image for this setting to appear)

  4. Drag the speed bar image into the Img field in the inspector of the HUD Speed Display Controller component

If you want to display speed as a number as well:

  1. Create a text for the speed number display and add a UVC Text TMPro UGUI component (if it uses Text Mesh Pro) or a UVC Text UGUI component (if it uses Unity's UGUI)

  2. Drag the component you added in step 1 into the Speed Text field in the inspector of the HUD Speed Display Controller component you added above

Mech Combat Kit

To display the speed of a mech on the UI:

  • Add a Speed Bar Controller component somewhere on the vehicle

  • Set the Character Controller field to the mech's Rigidbody Character Controller component and set the Rigidbody too

  • Create an Image for the speed bar and make sure its Image Type > Fill Method is set to Filled (you will need to add a sprite of some kind to the Image for this setting to appear)

  • Drag the speed bar image into the Speed Bar Fill field in the inspector of the Speed Bar Controller component

If you want to display speed as a number as well:

  1. Create a text for the speed number display and add a UVC Text TMPro UGUI component (if it uses Text Mesh Pro) or a UVC Text UGUI component (if it uses Unity's UGUI)

  2. Drag the component you added in step 1 into the Speed Text field in the inspector of the Speed Bar Controller component you added above

Last updated