I am making a War Game and i need Bombs that makes holes in the terrain when exploded.
I googled but i found nothing useful.
You should use the TerrainData.SetAlphamaps method to affect the terrain (creating indents in the terrain rather than holes exposing the background texture…unless you have different ideas.)
TerrainData.SetAlphamaps:
My God. I came in expecting to see people telling him it was too complicated, and find you actually had an asset prepared. lol
And this,
Real-time Terrain Deformation
http://blog.almostlogical.com/2010/06/10/real-time-terrain-deformation-in-unity3d/
Thanks, i modify ita bit, and if the game is finished i write you in the Credits ^^
WHAT THE…?! All right, it’s time to dig my old tank project.
Thanks ![]()
So i got another Problem.
how can i make , when the Player is near the Explosion, that he loses health??
Instantiate a collider during the explosion.
Set the collider size with little bit bigger than the explosion (for the blast/splash damage)
Use trigger on the player collider and read the explosion’s collider tag.
If the explossion collider is detected hitting the Player, reduce the HP.
Thanks.
But i have another Idea.
Is it Possible to place a Trigger over the Terrain, and in the trigger, make Bombs randomly spawn?
How can i do that?
You mean random explosion on terrain? Or random bomb drop to terrain?
How the trigger would be activated? Just like a land mine? When player step on it, it will explode. Like that?
Short answer, yes. It’s possible.
How can i make the Crater bigger?