Search Unity

Finding width of a plane

Discussion in 'Scripting' started by sap12345612, Apr 12, 2017.

  1. sap12345612

    sap12345612

    Joined:
    Mar 29, 2017
    Posts:
    4
    Hi, I'm new to unity and I'm trying to find the width of an object (a plane) so I can line up multiple planes together. I need this measurement as the planes are randomly picked from an array to be spawned in one after the other (in a line) and each has a different width.
    I've been searching online a lot and done a lot of experimenting with no luck, any solutions?
    also is there a way to make the join between planes basically seamless?


    Thanks.
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Try Renderer.bounds
     
  3. sap12345612

    sap12345612

    Joined:
    Mar 29, 2017
    Posts:
    4
    That worked thanks.
     
  4. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712