How to rotate selection on mesh in geometry nodes?

Hello,
Now I am working on parametric model of rampart. I made this function to level the top of the wall, even if its foundations are in the difficult terrain. But it levels into absolute horizontal plane, but often this surface is at a certain angle.

I want to rotate the upper surface of the wall into angle (of the potential hill) But classical rotation would deeform the rampart. The idea is that all the points of the upper surface (extruded from the base) should be above the points of the base from which they are extruded, even after adjusting the angle. So it will be an adjustment of the position of individual points based on their position - for example, the more to the left in the length of the wall, the higher the point will be, and the more to the right, the lower it will be.

The only problem is that I don’t know how to do it. Please help me!

I’m not sure if it’s the most optimal solution, but I was able to get a result by only adding a few extra nodes to your setup.


This multiplies the height of each point of the top surface with it’s position on the x-axis, so the further along the positive x axis the points are, the lower they are. If you want to change the angle, then adjust the value in the Multiply Math node.

Hope this helps!

1 Like

It does exactly what I need. Many thanks.