Hi I am making a marble game and I was wondering how to make a script that could destroy an object if a marble is fast enouf. I hope you understand what I said… Thank you for answering.
You could try a if statement inside the collision:
function OnCollisionEnter(other:Collision){
if(other.gameObject.tag =="box"){
if(velocity>=fastenuf){
Destroy(other.gameObject);
}
else {
bouncingFunction();
}
}
}