using UnityEngine; using System.Collections; public class PhysicsDebug : MonoBehaviour { public WorldSpaceLabel velocityOutput; void FixedUpdate() { var rb = GetComponent(); if (rb != null) { velocityOutput.text = "Velocity: " + rb.velocity; } } }