- Home /
Simple mesh height alteration.
I'm newish to Unity and still learning,I am looking for a simple piece of code that takes a certain position in my plane and increases my height by say one. I have been searching and haven't been able to find a simple example that I can follow to extent on. I would prefer the example to be in JavaScript. I have some code that does this to the terrain which I am following alright, but it accesses and changes the terrainData for different positions and I would like to change that for a mesh.
The idea is to move a mesh +1 units in the y axis? Or to move a single vector in a plane mesh +1 units in the y axis?
@arranstobbs: I've converted your "Answer" into a comment. Please, don't use the answer function for comments. You can edit your question if you think you have to add information or use comments.
mat$$anonymous$$ton83 didn't post an answer because he's not sure what you want to do so he posted a comment to clarify your question.
To move a single vector from plane mesh +1 in the y axis?
I have been looking into perlin noise and and want to manipulate the height. It's someone else's code for the terrain but I'm using to help me learn and want to use it on a mesh ins$$anonymous$$d.
Answer by Julien-Lynge · Nov 22, 2011 at 10:28 PM
You can download a whole bunch of procedural examples from
http://unity3d.com/support/resources/example-projects/procedural-examples.html
What you want to do is called procedural mesh extrusion, and there are multiple example scenes there with scripts that do what you want (I think they're even in Javascript).