Ashby Issac 0bace59e6d Car movement and camera changes.
Integrated custom car movements and fixed issues with follow camera behaviours.
2026-01-05 13:34:57 +05:30

19 lines
482 B
C#

using TMPro;
using UnityEngine;
public class FPSCounter : MonoBehaviour
{
private float deltaTime = 0.0f;
public TextMeshProUGUI fpsText;
void Update()
{
// Calculate the time it took to render the last frame
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
// Calculate FPS and display it in the console
float fps = 1.0f / deltaTime;
fpsText.text = (fps).ToString();
Debug.Log("FPS: " + Mathf.Round(fps));
}
}