*
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user