How do you select an area on the mesh to decrease on the y axis for the vertices like you see in map editors, you get like a small circle which represents the area that decrease's or increases.
Map Editor Terrain Increase/Decrease
Crossbones+ - Reputation: 2918
Posted 11 May 2014 - 06:09 PM
Your problem (which isn't overly complicated) has few phases to solve:
- find a ray starting from camera position and going to the direction pointed by the mouse (look for mouse picking ray casting on google)
- find intersection point of the ray from previous phase and the terrain
- get all vertices / height samples from a desired radius by using the intersection point from the last phase
- apply desired modify function to the height values (such as level terrain, add height, decrease height, blur ...). You may use the distance between the vertex and the intersection point as a blend value to smooth the modify function.