- Home /
Spawning blood splatter at the point the bullet hit a collider?
So, I want a blood splatter to appear at the point the bullet hit my zombie. As it stands right now it will only show up at the feets of the zombie.
var HP : int = 100;
var hit : GameObject; //The blood splatter it self.
function OnCollisionEnter(collision : Collision){
if(collision.gameObject.tag == "Bullet"){
HP -= 10; //How much damage the zombie take when hit.
audio.Play();//Sound of the zombie geting hurt.
var blood = Instantiate(hit, transform.position, Quaternion.identity);
}
}
Comment