- Home /
Scaling an object with "even thickness"
Sorry for the title, I'm not english native... :) Basically I build a mesh representing an exterior wall of a building (actually it's a house editor), then combine meshes and instantiate a new gameObject with flipped normals to represent internal walls. What I wanna do is to scale the internal wall to simulate the thickness of the building, something like the Inset tool of Blender. How could I do?
Answer by Cherno · Mar 23, 2015 at 07:20 PM
You can use the inverted normal vector3 of the outer wall and combine if with the required thickness value to find out how far the vertices of the inner wall have to be moved.
Yes, this is what I'm actually trying to do. I only need that after the user finishes to create the building, so the execution time isn't such a big deal. Though I think there must be a better way to script it other than a long "if" sequence.
Your answer
Follow this Question
Related Questions
Keep gizmos the same with the object scale 2 Answers
How to scale specific part of texture when game object scales? 0 Answers
Any way to get texture scale or original resolution in build 0 Answers
Cleanup GameObject Scale in hierarchy? 1 Answer
UI Constant Physical Size, rect sizes not corresponding to real sizes 0 Answers