Hi all,
I’m attempting to make a top down scrolling shooter. I have the player and enemies all at a height, with terrain beneath them. The camera looks down at the player as the terrain scrolls by beneath them.
There are two things I’m trying to do which are causing me some issues and I’m hoping that there’s someone out there who understands what I’m trying to do and has a solution.
Firstly, my enemies are kinematic but when they are destroyed, they instead make use of gravity. From the game’s overhead view, it looks as if they are being shot out of the sky and are falling away from us to the terrain below.
However, I’m having issues detecting the collision between the enemies and the terrain. The enemy’s box collider is set to be a trigger and the terrain below has a terrain collider. The terrain has a script which creates an explosion effect at the location of the contact between enemy and terrain.
However, no collision occurs, with the enemy simply falling through the terrain. This is my first time using terrain so does anybody have any idea as to what the problem may be?
Secondly, my terrain object is flat and I’m using an image taken from google maps as a texture, so that it looks like you’re looking down on a city from above. What I would like to do is have the epxlosion effects (and gamelogic) be able to understand where an enemy has crashed. For example, if an enemy object falls into an ocean or a lake, I want to instantiate a water splash. On the other hand, if they fall into a building, I want to instantiate an explosion and perhaps some fire.
Does unity have any support for material maps, so that I can create an material map from my google maps images?
Thanks in advance…