Speed UI

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