- Home /
Resize an object without scaling
I was wondering how to resize an object without scaling it? What I mean is: How do I make a 4x4 cube that is also 4X4 in its local coordinate system?
What I mean is - when I add a cube and set scale to 4 on all 4 axes it is a 4x4 cube in world space. But in local space it is still just a 1x1 cube. Example: If the cube is placed at world zero then one of the corners will be at 2, 2, 2 in world space, but that same corner will still only be at 0.5, 0.5, 0.5 in the local space of the cube
Answer by robertbu · Nov 20, 2014 at 09:35 PM
I'm assuming that you want a cube that is 4x4x4 in world space when it local scale is (1,1,1) If so, then the mesh will need to be resized. At the following question:
http://answers.unity3d.com/questions/561786/how-to-export-obj-from-editor-with-rescaled-mesh.html
You will find an editor script called RotateMesh. It is designed to change the local rotation of a mesh, but it also resets the scale. Put it in your Assets/Editors folder. Then: 1) create a cube, 2) size that cube to 4x4x4, 3) select the cube in the hierarchy, 4) Select RotateMesh from the Windows menu. The result will be a clone cube in which the local scale will be 4x4x4.
Thanks:) This does the trick - just had to comment out where it also tries to save it as an asset. I kinda wonder why something like this isn't a feature already...
In general this sort of work is done in modelling software. The scripting options are typically for modifying meshes at runtime. That's why there is no default menu to do this.
Almost 4 years later I stumbled upon this, and literally saved me a lot of time. Thank you!
Your answer
Follow this Question
Related Questions
How to shorten/extend an object? 2 Answers
Resize object in runtime 1 Answer
Resize Texture2D comes out grey 2 Answers
Resize the resolution of a sprite sheet and maintain the proportion percentage of the slices. 2 Answers
Particle Scaling 4 Answers