Hello! i was wondering if there was anyway to resize a mesh, within GDScript, towards a certain point; for example, the center of the object?
Any assistance or feedback will helpful, and thank you for reading.
My current version is 4.4.1, stable.
Hello! i was wondering if there was anyway to resize a mesh, within GDScript, towards a certain point; for example, the center of the object?
Any assistance or feedback will helpful, and thank you for reading.
My current version is 4.4.1, stable.
Resize mesh vertex data or scale a mesh instance? If letter, simply add additional blank 3d node as a parent and scale that
To scale vertex data from a point, I think this will work to get the new vertex position:
new_vertex = scale_factor * (vertex - origin) + origin
It’ll work but better to multiply a packed array with a matrix, to avoid vertex iteration in script code.
Ok, so, the way I did it for my own project is that I just edited the source node’s (in this current case, the Player) scale, BUT! I would love to keep this up and expand on this current topic because I love finding ways to do something that would be simple to implement and making them into cool little puzzles.