- Home /
cause the object appears in front of the player when colliding with another object
This is my .js
public var sensor : GameObject; public var enemy : GameObject;
function Start () { gameObject.SetActive (false);
}
function Update () {
} function OnCollisionEnter(collision : Collision) {
{GameObject("enemy");
{gameObject.SetActive (true);
}
}
// Destroy the projectile
Destroy (gameObject);
}
Comment