Hey! First when you saw this, you probably tought that some dumbass cant scale :). Well I don’t wanna totally normally scale. I wanna do something like this.
I have an box.
and I want to scale it into this, and save the 1 and 2 scales.
If you are wondering why do I need this. I need this to create flowing water. Because I need something pretty fast, and this will do. The algorithm will scale the side 2 saves the number than makes another box next to it with scale 1 that will be big as scale 2 from the one before etc. Is it possible? If so than how?
Ok I made it…I needed to understand how the vertices work, and than it was easy :). If you wanna test it, just create a new .js script and add it to some cube… than with adjusting the V1 and V2 floats you can make the cube change. And for collider I use mesh collider and than I update it each frame. The whole thing runs totally smoothly, when i have the algorithm for water finished ill post a demo on the forum.
SilverTabby is right, modifying the mesh will do what you want. To match your illustration, you just need to move one of the vertices. See the documentation that SilverTabby linked to for an example.
Have you looked at the water assets that come with Unity? They get a flowing effect just with texture effects. Unity Pro’s version of the water assets add reflection, and have an ocean example that deforms the mesh to make waves.