- Home /
Question by
FKKrjakonzo · Mar 05, 2015 at 01:21 AM ·
collisiontagadd
Collision object tag
Can someone help me with adding tag of object which can be this script triggered var rb: Rigidbody;
function Start() {
rb = GetComponent.<Rigidbody>();
}
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
Comment