21/02/05 18:38:24.45 4263Dv0E.net
int n = 0;
Rigidbody rb = null;
private void Start()
{
rb = GetComponent<Rigidbody>();
}
private void Update()
{
if(n == 0)
{
rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
var v = new Vector3(0, 0, 200.0f);
rb.AddForce(v);
}
n++;
if(n == 2500)
{
rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
var v = new Vector3(0, 1.0f, -200.0f);
n = -2500;
rb.AddForce(v);
}
}