I am trying to make a speed limit for a vehicle in my game, but using Vector3.sqrmagnitude or magnitude gives me a slowly increasing number, it doesnt matter if the vehicle is moving slowly, quickly, or not at all. What’s going on? I’m using
float speed = GetComponent<Rigidbody>().velocity.magnitude;
Debug.log(speed);
to log my speed.