Question by
Samuel1324 · Dec 17, 2015 at 02:51 PM ·
controllercontrolscontrolactivationjavascripting
Can anyone please tell what to do make a bomb explode on touching ?
i am making a military scene where a the first person controller go and steps on a mine . i made the mine but how to make it working ??? any help would be appreciated.
Comment
Answer by Statement · Dec 20, 2015 at 11:50 PM
You could make a trigger collider. Add a script on the mine that listens for the trigger event. When the mine is triggered, consider to
Spawn an explosion effect at the mines location
Send a message to the object it collided with that it hit a mine, so it can take damage
Or, make the explosion apply explosive damage to objects around it, instead of the mine.Remove the mine from the game