|
Is it possible to modify the size of the standard game objects (e.g. plane, cube, etc.) instead of scaling them? I need the width and length of objects to position them side by side. When I scale the objects I have to consider the scale factor and that makes positioning more difficult than necessary. So is there a possibility to get an change the size of these objects?
(comments are locked)
|
|
You can't. If your project specifically requires this, you might consider making your own versions of the primitives by building a mesh from scratch using the Mesh API. That way, you can position the vertices wherever you like so that your object is at the desired size when its scale is 1,1,1.
(comments are locked)
|
|
I think the scale in the standard game objects, is the actual size of the object. No, the scale is a multiplier. I already checked that. When you scale a cube by a scale of 10, it is ten units tall as it has a size of one unit. The same scale for a plane means a size of 100 units, as a plane has a standard size of 10 units. So you always need to know the standard size of all objects to calculate its real size. I would just like to get and modify the size.
Mar 02 '10 at 01:01 PM
tasbar
Hmm.. Plane then it's a different case.. cause how many planes you'll have in one scene anyways? With the rest of the standard objects you won't have a problem. But you might get into troubles if you'll start combining them and asking for the scale of the parent object. Besides that, you shouldn't have any problems. (check also if you can do something with the Vector3.magnitude)
Mar 02 '10 at 01:22 PM
Lipis
(comments are locked)
|

@tasbar, I don't have Unity right here, but if you put a
Cubein position(0, 0, 0)and anotherCubein(1, 0, 0)and both cubes with the scale of 1 in all dimensions, are they touching each other or overlapping?Yes, they are touching as a cube has the size of 1 unit.