- Home /
Real-time and historical input telemetry
Hi,
I'm currently making a car-based application for driver analysis, and at the moment I have only access to very basic real-time feedback, as below:
It's a start, and the bar charts work, but I need to go a bit more in depth. As well as this, I want to create a real-time line graph showing inputs over, say, the last 10 seconds, kind of like the right hand side this image:
My Google-fu is failing me (probably using the wrong search terms) so if anyone could even point me in the direction of a relevant tutorial I'd much appreciate it.
For interest: some relevant code I have so far
public class Player_Controller : MonoBehaviour
{
public float speed; //alter speed without recompiling, edit from editor
public Text speeddisplay; //Speed display variable
public Text superspeeddisplay; //Speed display variable (supervisor)
private float velocitydisp; //Velocity Display
public Slider steeringinputdisp; //steering axis slider
public Slider throttleinputdisp;
public Slider brakeinputdisp;
void SetSpeedDisplay()
{
speeddisplay.text = "Speed: " + velocitydisp.ToString("0") + "km/h"; //Speed display
superspeeddisplay.text = "Speed: " + velocitydisp.ToString("0") + "km/h";
float steeringinput = Input.GetAxis("Horizontal");
steeringinputdisp.value = steeringinput;
float throttleinput = Input.GetAxis("Throttle");
throttleinputdisp.value = throttleinput;
float brakeinput = Input.GetAxis("Brake");
brakeinputdisp.value = brakeinput;
}
}
Thanks in advance, I know this is a kind of niche question, but I think this project could turn out to be pretty cool if I get this down.
Your answer
![](https://koobas.hobune.stream/wayback/20220612112154im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Mouse and Oculus Touch Controller Inputs 0 Answers
How to use Multi-Tap in New Input System for Running? 1 Answer
(C#) A better way to limit actions to once per button press? 2 Answers