I’ve been looking around the internet and forums without finding an answer. i have a basic window as an object inside unreal, the traverses and the uprights have a section of 8.2 cm and a thickness of 7 cm. problem is i want to be able to change the scale of the object without changing the proportions of the traverses and the uprights. for example i want to scale the window from 1x1 meter to 1x2 meters without the traverses being distorted by the scaling.
Thanks to all those who wanna help out! i’ll leave a screenshot to better see the problem i have.
when unreal Scales an object about an axis (or all axles) it scales everything about that axis by that multiplier. actually in an attempt to maintain the overall proportions of the model relative to the 1x1x1.
an example would be if I scale a sword from 1x1x1 to 2x2x2 it will have the same proportions about every dimentsion, but if I scale it to 1x1x1.2 to have the blade be a little bit longer the handle, will be longer, and the crossbar (and pommel if it exists) will be distended.
there can be a few ways to accomplish what you want, but not all of them are “pretty”
- have the model be made uniquely for each configuration (keep in mind rotations are nearly free so 1x2 is technically the same as 2x1). this way you don’t get stretching when you only want to scale a single dimension.
- have the overall model constructed in a modular style, so in this context you would have piece of trim, side of frame, piece of glass, imported as separate Static/Skeletal meshes, and then assemble them in a single blueprint to be “PineWindow1By2” or “PineWindow1By1” this way you can scale each piece individually, and not have stretching of individual parts
- construct the edging of the window out of primitives then apply the texture for the edging to them (this can present problems if the camera will ever be close to them)
- modify the model using nanite this is technically one of the points of the system (though this might also require to have a texture for the edging and the glass separate anyways)
This can be done simply with geometry script,
First create whole box for window pane make it the size it xy the whole window dimension plus trims.
Next create a mesh to represent the inner trims and bool union this or cut then add trim
Next repeat for outer trim
Then bake to static mesh
All can be done with blueprints and expose variables, theres more to it like math etc but plenty of videos on the subject