- Home /
 
               Question by 
               OffThHeezay91 · Jul 21, 2017 at 06:03 AM · 
                meshplanebendbump  
              
 
              How would I deform a plane surface with a bumped line? (image attached)
I want to have a plane in my scene. Then in-game I want to hover my mouse over an area on the plane and when I mouse button down it must lift a line up in that area. I just need help to where I can look to get started. How would you go to do this?
My end goal is to have a plane and be able to make multiple "speedbumps" along the plane wherever I want. It should only lift it a certain y value.
Thanks 
 
                 
                example.jpg 
                (39.1 kB) 
               
 
              
               Comment
              
 
               
              Answer by kalanadis · Jul 21, 2017 at 11:06 AM
you can access mesh vertex positions from script and you can also edit them from code.
 MeshFilter mf = this.GetComponent<MeshFilter>();
         Vector3[] vertexAry = mf.mesh.vertices;
 
         //Edit selected values in vertexAry
         //then fill the values
 
         mf.mesh.vertices = vertexAry;
Your answer
 
 
             Follow this Question
Related Questions
Creating a 3D Plane Mesh Without a Filled Center 1 Answer
manipulate objects in game 2 Answers
Connecting several planes 0 Answers
3D outline shader problem in a plane 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                