Unity - Sorting GameObjects by Scale

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 5

  • @binwangcu
    @binwangcu 4 роки тому +2

    Great video! Swap positions took me a while after getting used to the tmp=cube1, cube1=cube2, cube2=tmp. In Unity, if you blindly apply that idea, tmp=cube1.position, cube1.position=cube2.position, cube2=tmp.position, that won't work. their y and z position should stay the same while only swap their x position. It is because the localscale is their identity, how big it looks like visually to you, and the y position needs to be pegged to the scale, hence stay the same, z axis never change (unless moving). Just want to share.

  • @user-gt9cb1hl2d
    @user-gt9cb1hl2d 2 роки тому +1

    Thank you so mush!💗

  • @shahriarmim4696
    @shahriarmim4696 4 роки тому

    couldn't we sort the GameObjects by integer values ? Like a particular integer is set for a particular cubes, so when does the integer get sorted then the correspondent cubes are also sorted ?

  • @medilies
    @medilies 5 років тому

    up