Bomb Explosions and Causing Damage To Health -OnCollisionEnter(Collision collision)

Опубликовано: 08 Октябрь 2024
на канале: Info Gamer
4,756
84

In this video, we take a previous bomb explosion prefab and tweak it to explode on any collision. We then tweak it again to blow up other bombs in the scene. In the last tweak we put a health count on the bomb and subtract that health when the bomb is in another explosion radius. When the health of the bomb is less than or equal to 0 it will then trigger its explosion effect. We use OnCollisionEnter(Collision collision) but could also use OnTriggerEnter(Collider other) if you want to use triggers instead of collider calls. I hope you have enjoyed creating a bomb in unity and figured out some helpful tips. Let's Create some bombs that cause damage

Discord:   / discord  
Website: https://infogamerhub.com
Become a Member: https://www.infogamerhub.com/membersh...

SUBSCRIBE for regular Video Game making videos:
   / @infogamer2145