using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { float t = 0; Rigidbody rb; // Start is called before the first frame update void Start() { rb = GetComponent(); } // Update is called once per frame void FixedUpdate() { t += Time.fixedDeltaTime; if(t >= 1f){ Debug.Log( t + "/" + rb.velocity.magnitude ); t -= 1f; } } }