DAY #011


Destroying the targets with a bullet.

(using also the script from day 10)

Main points covered




C# script (attached to the bullet)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class destroy : MonoBehaviour {

void OnTriggerEnter(Collider other) {


*OBS: One of the gameobjects must have a Rigidbody and the target must have the is trigger checked.

Leave a Reply

Your email address will not be published. Required fields are marked *