Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

How can i "connect" a object to another by resizing it?

Discussion in 'Scripting' started by pronixer132sd, Nov 1, 2021.

  1. pronixer132sd

    pronixer132sd

    Joined:
    Aug 16, 2020
    Posts:
    2
    What i mean is like, lets say
    i have object 1 at X: -40
    and i have object 2 at X:90

    how can i make object 2 be resized in order to be "connected" to object 1
    Example:

    Thanks!
     
  2. RadRedPanda

    RadRedPanda

    Joined:
    May 9, 2018
    Posts:
    1,656
    Just set object 2's position to the middle of the two, and its size as the distance of them.
     
    Kurt-Dekker likes this.