So I have written what I thought was a very very VERY simple and easy script but noooooo…
this is it, it is supposed to be an arrow that moves forward and gets destroyed when it hits something.
#pragma strict
var speed = 5;
function Update () {
transform.Translate(Vector3.forward * speed * Time.deltaTime);
}
function OnCollisionEnter () {
Destroy(gameObject);
}
but it shoots right through my capsule every time. both the arrow and capsule have colliders. help.