- Home /
How to attach a terrain to an object?
Hi, I need to attach a terrain to a spaceship so it can move along with it,the ship can go up and down, left and right, and speed up or slow down, I also want the terrain to be invisible, is there a way to do that?? thanks in advance
Answer by Lo0NuhtiK · Apr 24, 2012 at 02:35 AM
Just child the terrain object to the space ship object to make it stick with it, and to make the terrain invisible for whatever reason then set it's terrain enabled to false.
quick test : throw this on your terrain object and try it ->
function Update(){
if(Input.GetKeyDown(KeyCode.T))
gameObject.getComponent(Terrain).enabled = false ;
if(Input.GetKeyUp(KeyCode.T))
gameObject.getComponent(Terrain).enabled = true ;
}
Your answer
Follow this Question
Related Questions
Object movement with smooth start and end? 2 Answers
Random object placement. 1 Answer
How can I bake normal map detail into a terrain light map? 0 Answers
Parent and child object have same physics 1 Answer
Motion over sloped terrain 0 Answers