Can someone help me with adding tag of object which can be this script triggered
var rb: Rigidbody;
function Start() {
rb = GetComponent.();
}
function OnCollisionEnter(collision : Collision){
for (var contact : ContactPoint in collision.contacts) {
Debug.DrawRay(contact.point, contact.normal, Color.white);
rb.velocity = new Vector3(-rigidbody.velocity.x, -rigidbody.velocity.y, -rigidbody.velocity.z);
}
}
i got script here and i want to add tag but i dont know where i could add it
Sorry for bad english
↧