Rotate a grid

  • July 30, 2017 at 16:44 #21530
    ariklmr
    Participant

    Hello,

    i want the grid to be rotated with the transform. like its doing with the position..

    i need it for the case where i have a prefab with a grid, but its can be rotated on different scene.
    if its not possible that i can do it in the code?

    like on awak check the rotation of the transform and if its 90 then i do

    tempx = grid.sizeX;
    grid.sizeX = grid.sizeZ;
    grid.sizeZ = tempx;

    and then i can rebake the grid? how?

    thanks

    July 31, 2017 at 13:15 #21545
    Geminior
    Keymaster

    Please have a look at our tutorials on grids, for example: Run time Grid Creation

You must be logged in to reply to this topic.