- Home /
Question by
ishan00kaushik · Sep 20, 2015 at 07:50 AM ·
positionscaleunity 4.6pivotlocalscale
Transform position from end of gameObject
Hi All,
I am creating a cube , Scaling the object and assigning its location from a script.
Now when i scale the cube it messes up with view. As the generated object on the terrain (when scaled up) goes inside the terrain. This is due to pivot of the cube is at its center.
Assume a situation where i want to place the object at (0,0,0) as my terrain is also placed on (0,0,0) the cube look fine with scaling of (1,1,1) but once i increase size to (1,10,0) the object goes half beneath the terrain.
Is there any work around to this. Like changing Pivot (Which i tried but didn't worked) or fixed surface growth and not axis growth.
If it helps following is my Pseudo code -
CreatePrimitve cube;
Scale the object;
Assign the localscale;
Comment