Hi
I have the script below to fly a missile towards my plane and destroy it. That's great. But.. the missile flies directly into the terrain if there is a hill in the way. How can I make it smart and have it smoothly fly over terrain mountains to get to the target. It would also need to rotate on its axis when going up a mountain for eg.
I was going to use something like this..
terrainHeightWhereWeAre = Terrain.activeTerrain.SampleHeight( transform.position );
if...
Smart missile that detects terrain
I have the script below to fly a missile towards my plane and destroy it. That's great. But.. the missile flies directly into the terrain if there is a hill in the way. How can I make it smart and have it smoothly fly over terrain mountains to get to the target. It would also need to rotate on its axis when going up a mountain for eg.
I was going to use something like this..
terrainHeightWhereWeAre = Terrain.activeTerrain.SampleHeight( transform.position );
if...
Smart missile that detects terrain