The ball keeps rolling in the direction it was prior to teleporting. The velocity is just about halved rather than being completely reset. Any ideas on why this may be?
#pragma strict
var maxFallDistance = -1;
var maxJumpDistance = 30;
var startlocale:Vector3;
function Start(){
startlocale = transform.position;
}
function Update () {
if ((transform.position.y<=maxFallDistance)&&(transform.position.y<=maxJumpDistance)){
rigidbody.velocity=Vector3(0,0,0);
transform.position=startlocale;
deathCounter.deaths += 1;
Coinpickup.coins = 0;
}
}