—> German Below <—
Hello,
I am looking for a way to create a 2D object that I can edit any way I want in the source code.
The object should be a rectangle, which can be scaled as a bar in a triangle. It should only be scaled in length and not in height. (See example image).
With an effect line I have found no possibility to adjust the sides to the angle.
With an SVG file either the angle does not fit, or it also scales with the height.
Which possibility would fit to it ?
Translated with www.DeepL.com/Translator
Hallo,
ich suche nach einer Möglichkeit ein 2D Object zu erstellen, welches ich beliebig im Quellcode bearbeiten kann.
Das Object soll ein Rechteck sein, welches als Balken in einem Dreieck skaliert werden kann. Dabei soll es nur in der länge skaliert werden, und nicht in der Höhe. (Siehe beispiel Bild).
Bei einer Effect-Line habe ich keine Möglichkeit gefunden die Seiten dem Winkel anzupassen.
Bei einer SVG-Datei passt entweder der Winkel nicht, oder sie Skaliert auch mit der Höhe.
Welche Möglichkeit würde dazu passen ?
can make quad mesh, so you can manually move those 4 vertices anywhere:
1 Like
Thank you for your fast answer, i’ll try it
So now i can create the mesh in the Code, but i dont understand to move the vertices in my Update Function
you have that vertices array, can modify the values, then assign to mesh again.