Search Unity

Unity 3D - Make 3D object fill size of parent

Discussion in '2D' started by Primoz56, Jan 13, 2020.

  1. Primoz56

    Primoz56

    Joined:
    May 9, 2018
    Posts:
    369
    Hi guys,

    I'm surprised there's no 3D forum, so i'm posting here, sorry.

    Been working with 2D for a long time and I understand the whole anchors/position/pivot setup unity has going. I'm trying to align my objects in 3D the same way but am having issues - namely if i insert a 3d mesh (eg. cube) it has it owns sizing outside of the constraints of transform or recttransform.

    My question is - How do I make an object fit perfectly between position X1 and X2?

    So if it's a cube it should take up the entire space designated by the transform.

    For context - I'm trying to create a wall and then have that wall scale based on area size.

    Thanks,
    Primoz