16 lines
324 B
C#
16 lines
324 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class PhysicsDebug : MonoBehaviour {
|
|
public WorldSpaceLabel velocityOutput;
|
|
|
|
|
|
void FixedUpdate() {
|
|
var rb = GetComponent<Rigidbody2D>();
|
|
if (rb != null) {
|
|
velocityOutput.text = "Velocity: " + rb.velocity;
|
|
}
|
|
|
|
}
|
|
}
|