Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Smart missile that detects terrain

$
0
0
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

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>